Commits

Ned Batchelder  committed 25b5ce4

Make tests.py runnable standalone

  • Participants
  • Parent commits aa28a53

Comments (0)

Files changed (1)

 # Tests for jslex
 
-import difflib
-from unittest import TestCase
+import difflib, unittest
 from jslex import JsLexer, js_to_c_for_gettext
 
-class JsLexTestCase(TestCase):
+class JsLexTestCase(unittest.TestCase):
     def assertMultiLineEqual(self, first, second):
         """Assert that two multi-line strings are equal.
 
     js, c = pair.split('-'*20+'\n')
     setattr(JsToCForGettextTest, "test_case_%d" % i, make_function(js, c))
 
+if __name__ == '__main__':
+    unittest.main()
+