Skip to content

Commit a4300a7

Browse files
committed
test: signal statuses are mysterious. #2008
1 parent 2fd4961 commit a4300a7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/coveragetest.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from collections.abc import Collection, Iterable, Iterator, Mapping, Sequence
2525

2626
import coverage
27-
from coverage import Coverage, env
27+
from coverage import Coverage
2828
from coverage.cmdline import CoverageScript
2929
from coverage.data import CoverageData
3030
from coverage.misc import import_local_file
@@ -417,11 +417,12 @@ def run_command(self, cmd: str, *, status: int = 0) -> str:
417417
Compare with `command_line`.
418418
419419
"""
420-
if status < 0 and env.LINUX:
420+
statuses = [status]
421+
if status < 0:
421422
# Mac properly returns -signal as the exit status. Linux returns 128 + signal.
422-
status = 128 - status
423+
statuses.append(128 - status)
423424
actual_status, output = self.run_command_status(cmd)
424-
assert actual_status == status
425+
assert actual_status in statuses
425426
return output
426427

427428
def run_command_status(self, cmd: str) -> tuple[int, str]:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy