Skip to content

Commit

Permalink
fix: do not modify fixture data
Browse files Browse the repository at this point in the history
  • Loading branch information
ssato committed May 11, 2024
1 parent 811b111 commit 9331680
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/api/loads/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,11 @@ def test_loads(content: str, exp, scm: str, opts: dict):
def test_loads_without_schema(content: str, exp, scm: str, opts: dict):
assert scm or exp

opts.update(ac_schema=SCM_NG_0)

with pytest.raises(ValidationError):
TT.loads(content, ac_schema_safe=False, **opts)
TT.loads(content, ac_schema=SCM_NG_0, ac_schema_safe=False, **opts)

with warnings.catch_warnings(record=True) as warns:
warnings.simplefilter("always")
assert TT.loads(content, **opts) is None
assert TT.loads(content, ac_schema=SCM_NG_0, **opts) is None
assert len(warns) > 0
assert issubclass(warns[-1].category, UserWarning)

0 comments on commit 9331680

Please sign in to comment.