From 10d43bd3bfbc01a51b4b92373fe4f71da5db50b8 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 5 Sep 2017 19:57:01 -0300 Subject: [PATCH 1/2] Set xfail_strict=True in pytest's own test suite Fix #2722 --- changelog/2722.trivial | 1 + tox.ini | 1 + 2 files changed, 2 insertions(+) create mode 100644 changelog/2722.trivial diff --git a/changelog/2722.trivial b/changelog/2722.trivial new file mode 100644 index 000000000..2c0ccd7b1 --- /dev/null +++ b/changelog/2722.trivial @@ -0,0 +1 @@ +Set ``xfail_strict=True`` in pytest's own test suite to catch expected failures as soon as they start to pass. diff --git a/tox.ini b/tox.ini index c6ce3e735..a989fe56f 100644 --- a/tox.ini +++ b/tox.ini @@ -200,6 +200,7 @@ python_files = test_*.py *_test.py testing/*/*.py python_classes = Test Acceptance python_functions = test norecursedirs = .tox ja .hg cx_freeze_source +xfail_strict=true filterwarnings = error # produced by path.local From abfd9774ef0f89d5430abf1b83a37ddf268e351b Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 12 Sep 2017 17:59:09 -0300 Subject: [PATCH 2/2] Remove xfail mark from passing test in py26 --- testing/code/test_source.py | 1 - 1 file changed, 1 deletion(-) diff --git a/testing/code/test_source.py b/testing/code/test_source.py index aaa2b8c5f..1d315aa9b 100644 --- a/testing/code/test_source.py +++ b/testing/code/test_source.py @@ -391,7 +391,6 @@ def test_deindent(): assert lines == ['', 'def f():', ' def g():', ' pass', ' '] -@pytest.mark.xfail("sys.version_info[:3] < (2,7,0)") def test_source_of_class_at_eof_without_newline(tmpdir): # this test fails because the implicit inspect.getsource(A) below # does not return the "x = 1" last line.