Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

gh-108303: Remove the non-test Lib/test/reperf.py #114356

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

Merged
merged 6 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion 9 Lib/test/_test_embed_structseq.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,14 @@ def test_sys_funcs(self):


try:
unittest.main()
unittest.main(
module=(
'__main__'
if __name__ == '__main__'
# Avoiding a circular import:
else sys.modules['test._test_embed_structseq']
)
)
encukou marked this conversation as resolved.
Show resolved Hide resolved
except SystemExit as exc:
if exc.args[0] != 0:
raise
Expand Down
23 changes: 0 additions & 23 deletions 23 Lib/test/reperf.py

This file was deleted.

11 changes: 7 additions & 4 deletions 11 Lib/test/test_embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -1971,7 +1971,11 @@ def test_no_memleak(self):
@unittest.skipUnless(support.Py_DEBUG,
'-X presite requires a Python debug build')
def test_presite(self):
cmd = [sys.executable, "-I", "-X", "presite=test.reperf", "-c", "print('cmd')"]
cmd = [
sys.executable,
"-I", "-X", "presite=test._test_embed_structseq",
"-c", "print('unique-python-message')",
]
proc = subprocess.run(
cmd,
stdout=subprocess.PIPE,
Expand All @@ -1980,9 +1984,8 @@ def test_presite(self):
)
self.assertEqual(proc.returncode, 0)
out = proc.stdout.strip()
self.assertIn("10 times sub", out)
self.assertIn("CPU seconds", out)
self.assertIn("cmd", out)
self.assertIn("Tests passed", out)
self.assertIn("unique-python-message", out)


class StdPrinterTests(EmbeddingTestsMixin, unittest.TestCase):
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.