Skip to content

Commit 2503422

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

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tests/test_validators.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,6 +659,7 @@ def test_member_validator_error_without_attr_name(self):
659659
If a member validator raises an exception whose message does not
660660
contain the attr name, the original exception is re-raised unchanged.
661661
"""
662+
662663
def _validator(inst, attr, value):
663664
raise ValueError("something went wrong")
664665

@@ -668,6 +669,7 @@ def _validator(inst, attr, value):
668669
with pytest.raises(ValueError, match="something went wrong"):
669670
v(None, a, ["ok", "bad"])
670671

672+
671673
class TestDeepMapping:
672674
"""
673675
Tests for `deep_mapping`.
@@ -820,12 +822,12 @@ def test_validators_iterables(self, conv):
820822
assert and_(*value_validator) == v.value_validator
821823
assert and_(*mapping_validator) == v.mapping_validator
822824

823-
824825
def test_key_validator_error_without_attr_name(self):
825826
"""
826827
If a key validator raises an exception whose message does not
827828
contain the attr name, the original exception is re-raised unchanged.
828829
"""
830+
829831
def _key_validator(inst, attr, value):
830832
raise TypeError("bad key type")
831833

@@ -840,6 +842,7 @@ def test_value_validator_error_without_attr_name(self):
840842
If a value validator raises an exception whose message does not
841843
contain the attr name, the original exception is re-raised unchanged.
842844
"""
845+
843846
def _value_validator(inst, attr, value):
844847
raise TypeError("bad value type")
845848

@@ -849,6 +852,7 @@ def _value_validator(inst, attr, value):
849852
with pytest.raises(TypeError, match="bad value type"):
850853
v(None, a, {"a": "bad_value"})
851854

855+
852856
class TestIsCallable:
853857
"""
854858
Tests for `is_callable`.

0 commit comments

Comments
 (0)