Skip to content

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

Closed
wants to merge 2 commits into from

Conversation

nascheme
Copy link
Member

@nascheme nascheme commented Mar 3, 2021

@nascheme
Copy link
Member Author

nascheme commented Mar 3, 2021

This PR will fail until __hello__ frozen module is re-generated, e.g. PR #24714.

@github-actions
Copy link

github-actions bot commented Apr 3, 2021

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Apr 3, 2021


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
Copy link
Contributor

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)
Copy link
Contributor

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).

@github-actions github-actions bot removed the stale Stale PR or inactive for long period of time. label Aug 4, 2022
Copy link
Member

@iritkatriel iritkatriel left a 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.

@bedevere-bot
Copy link

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

@nascheme
Copy link
Member Author

This PR seems obsolete now since Eric Snow added some tests to test_frozen (e.g. gh-28664). Closing it and the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting changes skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants