Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion pytest_timeout.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ def timeout_sigalrm(item, settings):
dump_stacks(terminal)
if nthreads > 1:
terminal.sep("+", title="Timeout")
pytest.fail("Timeout >%ss" % settings.timeout)
pytest.fail("Timeout (>%ss) from pytest-timeout plugin." % settings.timeout)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a nitpick for consideration - the word plugin at the end may not be necessary



def timeout_timer(item, settings):
Expand Down
8 changes: 4 additions & 4 deletions test_pytest_timeout.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def test_foo():
"""
)
result = pytester.runpytest_subprocess("--timeout=1")
result.stdout.fnmatch_lines(["*Failed: Timeout >1.0s*"])
result.stdout.fnmatch_lines(["*Failed: Timeout (>1.0s) from pytest-timeout plugin.*"])


def test_thread(pytester):
Expand Down Expand Up @@ -239,7 +239,7 @@ def test_foo():
"""
)
result = pytester.runpytest_subprocess()
result.stdout.fnmatch_lines(["*Failed: Timeout >1.0s*"])
result.stdout.fnmatch_lines(["*Failed: Timeout (>1.0s) from pytest-timeout plugin.*"])


def test_timeout_mark_timer(pytester):
Expand Down Expand Up @@ -480,7 +480,7 @@ def test_foo():
result = child.read().decode().lower()
if child.isalive():
child.terminate(force=True)
assert "timeout >1.0s" not in result
assert "timeout (>1.0s)" not in result
assert "fail" not in result


Expand Down Expand Up @@ -524,7 +524,7 @@ def test_foo():
result = child.read().decode().lower()
if child.isalive():
child.terminate(force=True)
assert "timeout >1.0s" in result
assert "timeout (>1.0s)" in result
assert "fail" in result


Expand Down