mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
Allow test_import to work when it is invoked directly
This commit is contained in:
parent
fe536f53ea
commit
14204ad982
1 changed files with 2 additions and 0 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue