fix test related to "not in"
This commit is contained in:
parent
709d5e3f2c
commit
adacd3491d
|
@ -15,7 +15,7 @@ Changes between 2.0.0 and 2.0.1.devX
|
||||||
with python3 (now that nose-1.0 supports python3)
|
with python3 (now that nose-1.0 supports python3)
|
||||||
- remove somewhat surprising "same-conftest" detection because
|
- remove somewhat surprising "same-conftest" detection because
|
||||||
it ignores conftest.py when they appear in several subdirs.
|
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"
|
- improve behaviour/warnings when running on top of "python -OO"
|
||||||
(assertions and docstrings are turned off, leading to potential
|
(assertions and docstrings are turned off, leading to potential
|
||||||
false positives)
|
false positives)
|
||||||
|
|
|
@ -116,8 +116,7 @@ class TestAssert_reprcompare:
|
||||||
|
|
||||||
def test_reprcompare_notin():
|
def test_reprcompare_notin():
|
||||||
detail = plugin.pytest_assertrepr_compare('not in', 'foo', 'aaafoobbb')[1:]
|
detail = plugin.pytest_assertrepr_compare('not in', 'foo', 'aaafoobbb')[1:]
|
||||||
assert '- aaabbb' in detail
|
assert detail == ["'foo' is contained here:", ' aaafoobbb', '? +++']
|
||||||
assert '+ aaafoobbb' in detail
|
|
||||||
|
|
||||||
@needsnewassert
|
@needsnewassert
|
||||||
def test_pytest_assertrepr_compare_integration(testdir):
|
def test_pytest_assertrepr_compare_integration(testdir):
|
||||||
|
|
Loading…
Reference in New Issue