FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-108303: Remove the non-test `Lib/test/reperf.py` by sobolevn · Pull Request #114356 · python/cpython · GitHub

/ cpython Public
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (3) All 1 file type selected
Deleted files Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
9 changes: 8 additions & 1 deletion Lib/test/_test_embed_structseq.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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']
)
)
Comment thread
encukou marked this conversation as resolved.
except SystemExit as exc:
if exc.args[0] != 0:
raise
Expand Down
23 changes: 0 additions & 23 deletions Lib/test/reperf.py

This file was deleted.

11 changes: 7 additions & 4 deletions Lib/test/test_embed.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Back | FazBrowse Home | New Git URL