Skip to content

Commit

Permalink
Merge pull request #3120 from mgorny/pypy-capture-test
Browse files Browse the repository at this point in the history
Fix exp. lineno in test_healthcheck_traceback_is_hidden on PyPy3.8
  • Loading branch information
Zac-HD authored Oct 19, 2021
2 parents 0576973 + 77cbe7e commit 4fe7e3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hypothesis-python/tests/pytest/test_capture.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import pytest

from hypothesis.internal.compat import WINDOWS, escape_unicode_characters
from hypothesis.internal.compat import PYPY, WINDOWS, escape_unicode_characters

pytest_plugins = "pytester"

Expand Down Expand Up @@ -106,7 +106,7 @@ def test_healthcheck_traceback_is_hidden(testdir):
timeout_token = ": FailedHealthCheck"
def_line = get_line_num(def_token, result)
timeout_line = get_line_num(timeout_token, result)
expected = 6 if sys.version_info[:2] < (3, 8) else 7
expected = 6 if sys.version_info[:2] < (3, 8) or PYPY else 7
assert timeout_line - def_line == expected


Expand Down

0 comments on commit 4fe7e3c

Please sign in to comment.