Skip to content
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix test_crashers on Windows
  • Loading branch information
vstinner committed Aug 22, 2023
commit fb5d432269583d30b9be3a1b1637e492c5a14912
8 changes: 7 additions & 1 deletion Lib/test/test_crashers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@ def test_crashers_crash(self):
if support.verbose:
print(f"Checking crasher: {script}", flush=True)
proc = assert_python_failure(fname)
self.assertLess(proc.rc, 0, proc)
if os.name != "nt":
# On Unix, if proc.rc is negative, the process was killed
# by a signal
self.assertLess(proc.rc, 0, proc)
else:
# Windows. For example, C0000005 is an Access Violation
self.assertGreaterEqual(proc.rc, 0xC0000000, proc)


def tearDownModule():
Expand Down