Skip to content

Commit

Permalink
test: Linux still borks one test, but now differently
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Dec 3, 2023
1 parent e31c159 commit 4fb0b74
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions coverage/collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,7 @@ def stop(self) -> None:

self.pause()

# Remove this Collector from the stack, and resume the one underneath
# (if any).
# Remove this Collector from the stack, and resume the one underneath (if any).
self._collectors.pop()
if self._collectors:
self._collectors[-1].resume()
Expand Down
6 changes: 2 additions & 4 deletions tests/test_concurrency.py
Original file line number Diff line number Diff line change
Expand Up @@ -736,11 +736,9 @@ def subproc(x):
""" + ("sigterm = true" if sigterm else "")
)
out = self.run_command("coverage run clobbered.py")
# Under the Python tracer on Linux, we get the "Trace function changed"
# message. Does that matter?
if "Trace function changed" in out:
# Under Linux, things go wrong. Does that matter?
if env.LINUX and "assert self._collectors" in out:
lines = out.splitlines(True)
assert len(lines) == 5 # "trace function changed" and "self.warn("
out = "".join(lines[:3])
assert out == "START\nNOT THREE\nEND\n"
self.run_command("coverage combine")
Expand Down

0 comments on commit 4fb0b74

Please sign in to comment.