Commits

Emile Anclin  committed c9fd955

py3k: fix test_import_graph.py to make it also runnable from pytest

  • Participants
  • Parent commits b03345c

Comments (0)

Files changed (1)

File test/test_import_graph.py

 import sys
 import os
-import unittest
+from logilab.common.testlib import unittest_main, TestCase
 from os.path import exists
 from cStringIO import StringIO
 
 
 from utils import TestReporter
 
-class DependenciesGraphTC(unittest.TestCase):
+class DependenciesGraphTC(TestCase):
     """test the imports graph function"""
 
     dest = 'dependencies_graph.dot'
 }
 '''.strip())
 
-class ImportCheckerTC(unittest.TestCase):
+class ImportCheckerTC(TestCase):
     def setUp(self):
         self.linter = l = PyLinter(reporter=TestReporter())
         initialize(l)
                     pass
 
 if __name__ == '__main__':
-    unittest.main()
+    unittest_main()