From 9331680541c9634e2baa61abee3381372f497d99 Mon Sep 17 00:00:00 2001 From: Satoru SATOH Date: Sat, 11 May 2024 14:30:22 +0900 Subject: [PATCH] fix: do not modify fixture data --- tests/api/loads/test_schema.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/api/loads/test_schema.py b/tests/api/loads/test_schema.py index d16b2450..c2deee0a 100644 --- a/tests/api/loads/test_schema.py +++ b/tests/api/loads/test_schema.py @@ -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)