mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix PT011 (`pytest.raises(ValueError)` is too broad)
This commit is contained in:
@@ -127,8 +127,10 @@ def test_signature():
|
||||
sig = inspect.stringify_signature(inspect.signature(list))
|
||||
assert sig == '(iterable=(), /)'
|
||||
else:
|
||||
with pytest.raises(ValueError):
|
||||
with pytest.raises(ValueError, match='no signature found for builtin type'):
|
||||
inspect.signature(list)
|
||||
with pytest.raises(ValueError, match='no signature found for builtin type'):
|
||||
inspect.signature(range)
|
||||
|
||||
# normal function
|
||||
def func(a, b, c=1, d=2, *e, **f):
|
||||
|
||||
Reference in New Issue
Block a user