Skip to content

Commit 29462b1

Browse files
committed
type-ignore in error-message test
1 parent 31a9c5c commit 29462b1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

testing/python/raises.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ def test_raises_function(self):
2121

2222
def test_raises_does_not_allow_none(self):
2323
with pytest.raises(ValueError, match="Expected an exception type or"):
24-
pytest.raises(expected_exception=None)
24+
# We're testing that this invalid usage gives a helpful error,
25+
# so we can ignore Mypy telling us that None is invalid.
26+
pytest.raises(expected_exception=None) # type: ignore
2527

2628
def test_raises_does_not_allow_empty_tuple(self):
2729
with pytest.raises(ValueError, match="Expected an exception type or"):

0 commit comments

Comments
 (0)