test files are rewritten in a subprocess
This commit is contained in:
parent
fefdca5787
commit
a4fe63c08d
|
@ -120,9 +120,12 @@ class TestAssert_reprcompare:
|
||||||
expl = ' '.join(callequal('foo', 'bar'))
|
expl = ' '.join(callequal('foo', 'bar'))
|
||||||
assert 'raised in repr()' not in expl
|
assert 'raised in repr()' not in expl
|
||||||
|
|
||||||
@pytest.mark.skipif("config._assertstate.mode != 'rewrite'")
|
def test_rewritten(testdir):
|
||||||
def test_rewritten():
|
testdir.makepyfile("""
|
||||||
assert "@py_builtins" in globals()
|
def test_rewritten():
|
||||||
|
assert "@py_builtins" in globals()
|
||||||
|
""")
|
||||||
|
assert testdir.runpytest().ret == 0
|
||||||
|
|
||||||
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:]
|
||||||
|
|
Loading…
Reference in New Issue