mirror of https://github.com/astral-sh/ruff
add; mactch and check keyword arguments test
This commit is contained in:
parent
d5d257e86b
commit
d6821ac525
|
|
@ -9,3 +9,15 @@ def test_ok():
|
||||||
def test_error():
|
def test_error():
|
||||||
with pytest.raises(UnicodeError):
|
with pytest.raises(UnicodeError):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def test_match_only():
|
||||||
|
with pytest.raises(match="some error message"):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def test_check_only():
|
||||||
|
with pytest.raises(check=lambda e: True):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def test_match_and_check():
|
||||||
|
with pytest.raises(match="some error message", check=lambda e: True):
|
||||||
|
pass
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue