@@ -20,7 +20,7 @@ def goodbye(self) -> str:
20
20
def test_any_matcher () -> None :
21
21
"""It should have an "anything except None" matcher."""
22
22
assert 1 == matchers .Anything ()
23
- assert False == matchers .Anything () # noqa[ E712]
23
+ assert False == matchers .Anything () # noqa: E712
24
24
assert {} == matchers .Anything ()
25
25
assert [] == matchers .Anything ()
26
26
assert ("hello" , "world" ) == matchers .Anything ()
@@ -30,7 +30,7 @@ def test_any_matcher() -> None:
30
30
def test_is_a_matcher () -> None :
31
31
"""It should have an "anything that is this type" matcher."""
32
32
assert 1 == matchers .IsA (int )
33
- assert False == matchers .IsA (bool ) # noqa[ E712]
33
+ assert False == matchers .IsA (bool ) # noqa: E712
34
34
assert {} == matchers .IsA (dict )
35
35
assert [] == matchers .IsA (list )
36
36
assert ("hello" , "world" ) == matchers .IsA (tuple )
@@ -42,21 +42,21 @@ def test_is_a_matcher() -> None:
42
42
43
43
44
44
def test_is_a_matcher_checks_instance (decoy : Decoy ) -> None :
45
- """The IsA matchers should respect ininstance logic."""
45
+ """The IsA matchers should respect isinstance logic."""
46
46
target = decoy .mock (cls = SomeClass )
47
47
assert target == matchers .IsA (SomeClass )
48
48
49
49
50
50
def test_is_not_matcher () -> None :
51
51
"""It should have an "anything that isn't this" matcher."""
52
52
assert 1 == matchers .IsNot (2 )
53
- assert False == matchers .IsNot (True ) # noqa[ E712]
53
+ assert False == matchers .IsNot (True ) # noqa: E712
54
54
assert {} == matchers .IsNot ({"hello" : "world" })
55
55
assert [] == matchers .IsNot (["hello" , "world" ])
56
56
assert ("hello" , "world" ) == matchers .IsNot (("hey" , "there" ))
57
57
58
58
assert 1 != matchers .IsNot (1 )
59
- assert False != matchers .IsNot (False ) # noqa[ E712]
59
+ assert False != matchers .IsNot (False ) # noqa: E712
60
60
assert {} != matchers .IsNot ({})
61
61
assert [] != matchers .IsNot ([])
62
62
assert ("hello" , "world" ) != matchers .IsNot (("hello" , "world" ))
@@ -71,7 +71,7 @@ def test_has_attribute_matcher() -> None:
71
71
assert {"hello" : "world" } != matchers .HasAttributes ({"hello" : "world" })
72
72
assert _HelloTuple ("world" ) != matchers .HasAttributes ({"goodbye" : "so long" })
73
73
assert 1 != matchers .HasAttributes ({"hello" : "world" })
74
- assert False != matchers .HasAttributes ({"hello" : "world" }) # noqa[ E712]
74
+ assert False != matchers .HasAttributes ({"hello" : "world" }) # noqa: E712
75
75
assert [] != matchers .HasAttributes ({"hello" : "world" })
76
76
77
77
@@ -87,7 +87,7 @@ def test_dict_matching_matcher() -> None:
87
87
88
88
assert {"hello" : "world" } != matchers .DictMatching ({"goodbye" : "so long" })
89
89
assert 1 != matchers .DictMatching ({"hello" : "world" })
90
- assert False != matchers .DictMatching ({"hello" : "world" }) # noqa[ E712]
90
+ assert False != matchers .DictMatching ({"hello" : "world" }) # noqa: E712
91
91
assert [] != matchers .DictMatching ({"hello" : "world" })
92
92
93
93
@@ -101,7 +101,7 @@ def test_error_matching_matcher() -> None:
101
101
"""It should have an "any error that matches" matcher."""
102
102
assert RuntimeError ("ah!" ) == matchers .ErrorMatching (RuntimeError )
103
103
assert RuntimeError ("ah!" ) == matchers .ErrorMatching (RuntimeError , "ah" )
104
- assert RuntimeError ("ah!" ) != matchers .ErrorMatching (TypeError , "ah" ) # type: ignore[comparison-overlap] # noqa: E501
104
+ assert RuntimeError ("ah!" ) != matchers .ErrorMatching (TypeError , "ah" ) # type: ignore[comparison-overlap]
105
105
assert RuntimeError ("ah!" ) != matchers .ErrorMatching (RuntimeError , "ah$" )
106
106
107
107
0 commit comments