Skip to content
Merged
Changes from all commits
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
10 changes: 7 additions & 3 deletions unittests/test_policies.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,8 @@ def _runall(checks, conn):
except BaseException as e:
exc = e

conn.send((exc, len(self.runner.stats.failures())))
stats = self.runner.stats
conn.send((exc, stats.num_cases(), len(stats.failures())))
conn.close()

rd_endpoint, wr_endpoint = multiprocessing.Pipe(duplex=False)
Expand All @@ -286,8 +287,11 @@ def _runall(checks, conn):
time.sleep(1)
p.terminate()
p.join()
exc, num_failures = rd_endpoint.recv()
assert 1 == num_failures
exc, num_cases, num_failures = rd_endpoint.recv()

# Either the test is submitted and it fails due to the termination
# or it is not yet submitted when the termination signal is sent
assert (num_cases, num_failures) in {(1, 1), (0, 0)}
with pytest.raises(ReframeForceExitError,
match='received TERM signal'):
if exc:
Expand Down