From 14204ad982309ae1ea5160b184709f10e7d22547 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Fri, 25 Apr 2008 21:43:56 +0000 Subject: Allow test_import to work when it is invoked directly --- Lib/test/test_import.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py index ad6de5e..ab6fc25 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() -- cgit v0.12