-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
Open
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtopic-replRelated to the interactive shellRelated to the interactive shelltype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
When run on a heavily loaded machine, test_pyrepl.test_history_survive_crash
will timeout and spuriously fail.
cpython/Lib/test/test_pyrepl/test_pyrepl.py
Lines 1722 to 1734 in 377b787
commands = "spam\nimport time\ntime.sleep(1000)\nquit\n" | |
try: | |
self.run_repl(commands, env=env, timeout=3) | |
except AssertionError: | |
pass | |
history = pathlib.Path(hfile.name).read_text() | |
self.assertIn("2", history) | |
self.assertIn("exit()", history) | |
self.assertIn("spam", history) | |
self.assertIn("import time", history) | |
self.assertNotIn("sleep", history) | |
self.assertNotIn("quit", history) |
I don't think we should increase the timeout as that will make the test take proportionally longer. I think that the test should check the repl subprocess's output instead of relying on the 3 second timeout.
Linked PRs
Metadata
Metadata
Assignees
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtopic-replRelated to the interactive shellRelated to the interactive shelltype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error