diff options
author | Ryan S. Brown <sb@ryansb.com> | 2017-12-05 16:36:24 -0500 |
---|---|---|
committer | Matt Clay <matt@mystile.com> | 2017-12-21 10:27:38 -0800 |
commit | ae5c370737bb99ed9344059622209c05aff575f2 (patch) | |
tree | 5106b90e0cbb0328fa72630a26f426d19f47cbbe /tox.ini | |
parent | cc6331f155db1f3d2a930a7bb2a342f1f80104d0 (diff) | |
download | ansible-ae5c370737bb99ed9344059622209c05aff575f2.tar.gz |
Fail hard when tests pass that are expected to fail
`@pytest.mark.xfail()` can be used to decorate tests that don't yet
pass. By default, if I wrote a test like this:
```
@pytest.mark.xfail()
def test_naughty():
assert 1 == 1
```
Then Pytest would allow this test to pass without notifying that an
expected-fail *didn't* fail. To make that happen, you have to set
xfail_strict=True so that the above test would cause the tests to fail.
Diffstat (limited to 'tox.ini')
-rw-r--r-- | tox.ini | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -20,6 +20,8 @@ passenv = # variable error. See issue: #20424 HOME +[pytest] +xfail_strict = true [flake8] # These are things that the devs don't agree make the code more readable |