diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2021-09-15 20:15:32 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-15 20:15:32 (GMT) |
commit | 3814e2036d96e2b6c69afce61926bb0a2a34d2d9 (patch) | |
tree | 07370122389b21359fabbd658bc0acafde69d127 /Lib/test/test_frozen.py | |
parent | d081eab7df176453c9834b852a579e1ada0354b2 (diff) | |
download | cpython-3814e2036d96e2b6c69afce61926bb0a2a34d2d9.zip cpython-3814e2036d96e2b6c69afce61926bb0a2a34d2d9.tar.gz cpython-3814e2036d96e2b6c69afce61926bb0a2a34d2d9.tar.bz2 |
bpo-45019: Clean up the frozen __hello__ module. (gh-28374)
Here's one more small cleanup that should have been in PR gh-28319. We eliminate stdout side-effects from importing the frozen __hello__ module, and update tests accordingly. We also move the module's source file into Lib/ from Toos/freeze/flag.py.
https://bugs.python.org/issue45019
Diffstat (limited to 'Lib/test/test_frozen.py')
-rw-r--r-- | Lib/test/test_frozen.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_frozen.py b/Lib/test/test_frozen.py index 52d8f7c..3d212b9 100644 --- a/Lib/test/test_frozen.py +++ b/Lib/test/test_frozen.py @@ -21,8 +21,9 @@ class TestFrozen(unittest.TestCase): if name in sys.modules: del sys.modules[name] with import_helper.frozen_modules(): - with captured_stdout() as out: - import __hello__ + import __hello__ + with captured_stdout() as out: + __hello__.main() self.assertEqual(out.getvalue(), 'Hello world!\n') |