From 1b6228abe83ceffd4aff0189716d1bec187538f5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 12 Apr 2022 13:58:38 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- changelog.d/951.change.rst | 2 +- tests/test_validators.py | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/changelog.d/951.change.rst b/changelog.d/951.change.rst index f32cb8da7..a4864c85d 100644 --- a/changelog.d/951.change.rst +++ b/changelog.d/951.change.rst @@ -1,4 +1,4 @@ validators._in() now includes the default argument "verbose_value_error=False". If set to True, the ValueError raised in _InValidator includes the attribute, -options and value in addition to the error message. \ No newline at end of file +options and value in addition to the error message. diff --git a/tests/test_validators.py b/tests/test_validators.py index 2132a43ca..781222678 100644 --- a/tests/test_validators.py +++ b/tests/test_validators.py @@ -471,9 +471,7 @@ def test_fail(self): a = simple_attr("test") with pytest.raises(ValueError) as e: v(None, a, None) - assert ( - "'test' must be in [1, 2, 3] (got None)", - ) == e.value.args + assert ("'test' must be in [1, 2, 3] (got None)",) == e.value.args def test_fail_verbose(self): """ @@ -500,9 +498,7 @@ def test_fail_with_string(self): a = simple_attr("test") with pytest.raises(ValueError) as e: v(None, a, None) - assert ( - "'test' must be in 'abc' (got None)", - ) == e.value.args + assert ("'test' must be in 'abc' (got None)",) == e.value.args def test_fail_with_string_verbose(self): """