]> granicus.if.org Git - python/commitdiff
rewrite a bit
authorBenjamin Peterson <benjamin@python.org>
Sun, 21 Mar 2010 17:34:54 +0000 (17:34 +0000)
committerBenjamin Peterson <benjamin@python.org>
Sun, 21 Mar 2010 17:34:54 +0000 (17:34 +0000)
Lib/test/test_extcall.py

index a10887e1630a2c63be46fa18bdd4bde8d545ad76..d9598e7e54a5121573105c2aa0b3d7995490aaeb 100644 (file)
@@ -1,4 +1,7 @@
 # -*- coding: utf-8 -*-
+
+import sys
+
 """Doctest for method/function calls.
 
 We're going the use these types for extra testing
@@ -275,7 +278,7 @@ import unittest
 from test import test_support
 
 
-class UnicodeKeywordArgsTest(unittest.TestCase):
+class ExtCallTest(unittest.TestCase):
 
     def test_unicode_keywords(self):
         def f(a):
@@ -292,9 +295,8 @@ class UnicodeKeywordArgsTest(unittest.TestCase):
 
 
 def test_main():
-    from test import test_extcall # self import
-    test_support.run_doctest(test_extcall, True)
-    test_support.run_unittest(UnicodeKeywordArgsTest)
+    test_support.run_doctest(sys.modules[__name__], True)
+    test_support.run_unittest(ExtCallTest)
 
 if __name__ == '__main__':
     test_main()