summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_import.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-04-25 21:43:56 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-04-25 21:43:56 (GMT)
commit14204ad982309ae1ea5160b184709f10e7d22547 (patch)
tree3590552cb5f868377397a1187cdcbb5a21ba6a87 /Lib/test/test_import.py
parentfe536f53ea1c4541e5297cea0c9460e5259cb1d8 (diff)
downloadcpython-14204ad982309ae1ea5160b184709f10e7d22547.zip
cpython-14204ad982309ae1ea5160b184709f10e7d22547.tar.gz
cpython-14204ad982309ae1ea5160b184709f10e7d22547.tar.bz2
Allow test_import to work when it is invoked directly
Diffstat (limited to 'Lib/test/test_import.py')
-rw-r--r--Lib/test/test_import.py2
1 files changed, 2 insertions, 0 deletions
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()