]> granicus.if.org Git - python/commitdiff
Allow test_import to work when it is invoked directly
authorBenjamin Peterson <benjamin@python.org>
Fri, 25 Apr 2008 21:43:56 +0000 (21:43 +0000)
committerBenjamin Peterson <benjamin@python.org>
Fri, 25 Apr 2008 21:43:56 +0000 (21:43 +0000)
Lib/test/test_import.py

index ad6de5e3c724f0d71488174fb62d5923b08deb8b..ab6fc2546dc5c0e1c3e7af5747119d99061958c4 100644 (file)
@@ -270,4 +270,6 @@ def test_main(verbose=None):
     run_unittest(ImportTest, PathsTests, RelativeImport)
 
 if __name__ == '__main__':
+    # test needs to be a package, so we can do relative import
+    from test.test_import import test_main
     test_main()