Skip to content

Commit

Permalink
make skips more precise
Browse files Browse the repository at this point in the history
  • Loading branch information
Zac-HD committed Oct 9, 2024
1 parent c169a93 commit 1516bfb
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions hypothesis-python/tests/ghostwriter/test_expected_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@ def various_numpy_annotations(
("re_compile", ghostwriter.fuzz(re.compile)),
(
"re_compile_except",
ghostwriter.fuzz(re.compile, except_=re.error)
# re.error fixed it's __module__ in Python 3.7
.replace("import sre_constants\n", "").replace("sre_constants.", "re."),
ghostwriter.fuzz(re.compile, except_=re.error).replace(
"re.PatternError", "re.error" # changed in Python 3.13
),
),
("re_compile_unittest", ghostwriter.fuzz(re.compile, style="unittest")),
pytest.param(
Expand All @@ -194,7 +194,10 @@ def various_numpy_annotations(
"timsort_idempotent_asserts",
ghostwriter.idempotent(timsort, except_=AssertionError),
),
("eval_equivalent", ghostwriter.equivalent(eval, ast.literal_eval)),
pytest.param(
("eval_equivalent", ghostwriter.equivalent(eval, ast.literal_eval)),
marks=[pytest.mark.skipif(sys.version_info[:2] >= (3, 13), reason="kw")],
),
("sorted_self_equivalent", ghostwriter.equivalent(sorted, sorted, sorted)),
(
"sorted_self_equivalent_with_annotations",
Expand Down Expand Up @@ -299,7 +302,6 @@ def various_numpy_annotations(
],
ids=lambda x: x[0],
)
@pytest.mark.skipif(sys.version_info >= (3, 13), reason="changed name/alias")
def test_ghostwriter_example_outputs(update_recorded_outputs, data):
name, actual = data
expected = get_recorded(name, actual * update_recorded_outputs)
Expand Down

0 comments on commit 1516bfb

Please sign in to comment.