Skip to content

Commit 290d162

Browse files
tjniTinche
authored andcommitted
Update attrs to 22.1.0 and fix test.
The ValueError from InValidator has been augmented to include a lot of other structured information that, for simplicity, we can ignore in the test.
1 parent e61f251 commit 290d162

File tree

2 files changed

+16
-35
lines changed

2 files changed

+16
-35
lines changed

poetry.lock

+14-32
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/test_validation.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,8 @@ class Test:
5252
with pytest.raises(ClassValidationError) as exc:
5353
c.structure({"a": 1, "b": "c", "c": "1"}, Test)
5454

55-
assert repr(exc.value.exceptions[0]) == repr(
56-
ValueError("'b' must be in ['a', 'b'] (got 'c')")
57-
)
55+
assert type(exc.value.exceptions[0]) == ValueError
56+
assert str(exc.value.exceptions[0].args[0]) == "'b' must be in ['a', 'b'] (got 'c')"
5857

5958

6059
def test_list_validation():

0 commit comments

Comments
 (0)