Skip to content

Commit 1b6228a

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 562eb51 commit 1b6228a

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

changelog.d/951.change.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
validators._in() now includes the default argument
22
"verbose_value_error=False". If set to True, the
33
ValueError raised in _InValidator includes the attribute,
4-
options and value in addition to the error message.
4+
options and value in addition to the error message.

tests/test_validators.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -471,9 +471,7 @@ def test_fail(self):
471471
a = simple_attr("test")
472472
with pytest.raises(ValueError) as e:
473473
v(None, a, None)
474-
assert (
475-
"'test' must be in [1, 2, 3] (got None)",
476-
) == e.value.args
474+
assert ("'test' must be in [1, 2, 3] (got None)",) == e.value.args
477475

478476
def test_fail_verbose(self):
479477
"""
@@ -500,9 +498,7 @@ def test_fail_with_string(self):
500498
a = simple_attr("test")
501499
with pytest.raises(ValueError) as e:
502500
v(None, a, None)
503-
assert (
504-
"'test' must be in 'abc' (got None)",
505-
) == e.value.args
501+
assert ("'test' must be in 'abc' (got None)",) == e.value.args
506502

507503
def test_fail_with_string_verbose(self):
508504
"""

0 commit comments

Comments
 (0)