Allow test_import to work when it is invoked directly

This commit is contained in:
Benjamin Peterson 2008-04-25 21:43:56 +00:00
parent fe536f53ea
commit 14204ad982
1 changed files with 2 additions and 0 deletions

View 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()