[ruff] Add ruff's check and autofix existing issues
This commit is contained in:
@@ -3086,7 +3086,7 @@ class TestFixtureMarker:
|
||||
def test_other():
|
||||
pass
|
||||
""" # noqa: UP031 (python syntax issues)
|
||||
% {"scope": scope} # noqa: UP031 (python syntax issues)
|
||||
% {"scope": scope}
|
||||
)
|
||||
reprec = pytester.inline_run("-lvs")
|
||||
reprec.assertoutcome(passed=3)
|
||||
|
||||
@@ -147,7 +147,7 @@ class TestRaises:
|
||||
try:
|
||||
pytest.raises(ValueError, int, "0")
|
||||
except pytest.fail.Exception as e:
|
||||
assert e.msg == f"DID NOT RAISE {repr(ValueError)}"
|
||||
assert e.msg == f"DID NOT RAISE {ValueError!r}"
|
||||
else:
|
||||
assert False, "Expected pytest.raises.Exception"
|
||||
|
||||
@@ -155,7 +155,7 @@ class TestRaises:
|
||||
with pytest.raises(ValueError):
|
||||
pass
|
||||
except pytest.fail.Exception as e:
|
||||
assert e.msg == f"DID NOT RAISE {repr(ValueError)}"
|
||||
assert e.msg == f"DID NOT RAISE {ValueError!r}"
|
||||
else:
|
||||
assert False, "Expected pytest.raises.Exception"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user