8000 gh-108297: Update test_crashers by vstinner · Pull Request #108299 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-108297: Update test_crashers #108299

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 3 commits into from
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
0