From: Benjamin Peterson Date: Fri, 25 Apr 2008 21:43:56 +0000 (+0000) Subject: Allow test_import to work when it is invoked directly X-Git-Tag: v2.6a3~99 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=14204ad982309ae1ea5160b184709f10e7d22547;p=thirdparty%2FPython%2Fcpython.git Allow test_import to work when it is invoked directly --- diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py index ad6de5e3c724..ab6fc2546dc5 100644 --- a/Lib/test/test_import.py +++ b/Lib/test/test_import.py @@ -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()