Deprecate raises(..., 'code(as_a_string)') / `warns(..., 'code(as_a_string)')

This commit is contained in:
Anthony Sottile
2018-11-22 10:05:10 -08:00
parent 5cf69fae7d
commit 1bba0a9714
26 changed files with 140 additions and 96 deletions

View File

@@ -906,7 +906,8 @@ class TestRequestMarking(object):
assert "skipif" not in item1.keywords
req1.applymarker(pytest.mark.skipif)
assert "skipif" in item1.keywords
pytest.raises(ValueError, "req1.applymarker(42)")
with pytest.raises(ValueError):
req1.applymarker(42)
def test_accesskeywords(self, testdir):
testdir.makepyfile(