-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
bpo-43381: Add frozen module co_lines() test #24712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This PR will fail until |
This PR is stale because it has been open for 30 days with no activity. |
|
||
|
||
class TestFrozen(unittest.TestCase): | ||
def test_frozen(self): | ||
name = '__hello__' | ||
if name in sys.modules: | ||
del sys.modules[name] | ||
# Invalid marshalled data in frozen.c could case the interpreter to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
case/cause
with captured_stdout() as out: | ||
import __hello__ | ||
self.assertEqual(out.getvalue(), 'Hello world!\n') | ||
|
||
@impl_detail('code object line table', cpython=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a small nitpick: cpython arg is not needed and other uses of @impl_detail in tests leave it out (with just one exception).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has merge conflicts now.
When you're done making the requested changes, leave the comment: |
This PR seems obsolete now since Eric Snow added some tests to |
https://bugs.python.org/issue43381