diff --git a/CHANGELOG b/CHANGELOG index 14d72e3d4..6a256c77d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -15,7 +15,7 @@ Changes between 2.0.0 and 2.0.1.devX with python3 (now that nose-1.0 supports python3) - remove somewhat surprising "same-conftest" detection because it ignores conftest.py when they appear in several subdirs. -- improve assertions ("not in"), thanks Floris +- improve assertions ("not in"), thanks Floris Bruynooghe - improve behaviour/warnings when running on top of "python -OO" (assertions and docstrings are turned off, leading to potential false positives) diff --git a/testing/test_assertion.py b/testing/test_assertion.py index 484b439ec..c7187372e 100644 --- a/testing/test_assertion.py +++ b/testing/test_assertion.py @@ -116,8 +116,7 @@ class TestAssert_reprcompare: def test_reprcompare_notin(): detail = plugin.pytest_assertrepr_compare('not in', 'foo', 'aaafoobbb')[1:] - assert '- aaabbb' in detail - assert '+ aaafoobbb' in detail + assert detail == ["'foo' is contained here:", ' aaafoobbb', '? +++'] @needsnewassert def test_pytest_assertrepr_compare_integration(testdir):