diff options
Diffstat (limited to 'Lib/test/test_runpy.py')
| -rw-r--r-- | Lib/test/test_runpy.py | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/Lib/test/test_runpy.py b/Lib/test/test_runpy.py index 2ddba34..f19c4ab 100644 --- a/Lib/test/test_runpy.py +++ b/Lib/test/test_runpy.py @@ -47,6 +47,7 @@ implicit_namespace = { "__cached__": None, "__package__": None, "__doc__": None, +# "__spec__": None, # XXX Uncomment. } example_namespace = { "sys": sys, @@ -56,7 +57,7 @@ example_namespace = { "run_name_in_sys_modules": False, "module_in_sys_modules": False, "nested": dict(implicit_namespace, - x=1, __name__="<run>", __loader__=None), + x=1, __name__="<run>", __loader__=None, __spec__=None), } example_namespace.update(implicit_namespace) @@ -243,6 +244,7 @@ class RunModuleTestCase(unittest.TestCase, CodeExecutionMixin): "__name__": mod_name, "__file__": mod_fname, "__package__": mod_name.rpartition(".")[0], +# "__spec__": None, # XXX Needs to be set. }) if alter_sys: expected_ns.update({ @@ -279,6 +281,7 @@ class RunModuleTestCase(unittest.TestCase, CodeExecutionMixin): "__name__": mod_name, "__file__": mod_fname, "__package__": pkg_name, +# "__spec__": None, # XXX Needs to be set. }) if alter_sys: expected_ns.update({ @@ -575,12 +578,5 @@ s = "non-ASCII: h\xe9" self.assertEqual(result['s'], "non-ASCII: h\xe9") -def test_main(): - run_unittest( - ExecutionLayerTestCase, - RunModuleTestCase, - RunPathTestCase - ) - if __name__ == "__main__": - test_main() + unittest.main() |
