fix flakes issues
This commit is contained in:
parent
65a145e2a7
commit
54c88a6cf3
|
@ -4,7 +4,6 @@ import sys
|
||||||
import py, pytest
|
import py, pytest
|
||||||
import _pytest.assertion as plugin
|
import _pytest.assertion as plugin
|
||||||
from _pytest.assertion import reinterpret
|
from _pytest.assertion import reinterpret
|
||||||
from _pytest.assertion import util
|
|
||||||
needsnewassert = pytest.mark.skipif("sys.version_info < (2,6)")
|
needsnewassert = pytest.mark.skipif("sys.version_info < (2,6)")
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1011,20 +1011,3 @@ def test_capturing_and_logging_fundamentals(testdir, method):
|
||||||
""")
|
""")
|
||||||
assert "atexit" not in result.stderr.str()
|
assert "atexit" not in result.stderr.str()
|
||||||
|
|
||||||
def test_close_and_capture_again(testdir):
|
|
||||||
testdir.makepyfile("""
|
|
||||||
import os
|
|
||||||
def test_close():
|
|
||||||
os.close(1)
|
|
||||||
def test_capture_again():
|
|
||||||
os.write(1, b"hello\\n")
|
|
||||||
assert 0
|
|
||||||
""")
|
|
||||||
result = testdir.runpytest()
|
|
||||||
result.stdout.fnmatch_lines("""
|
|
||||||
*test_capture_again*
|
|
||||||
*assert 0*
|
|
||||||
*stdout*
|
|
||||||
*hello*
|
|
||||||
""")
|
|
||||||
|
|
||||||
|
|
|
@ -123,8 +123,8 @@ class TestConfigAPI:
|
||||||
parser.addoption("--hello")
|
parser.addoption("--hello")
|
||||||
""")
|
""")
|
||||||
config = testdir.parseconfig()
|
config = testdir.parseconfig()
|
||||||
pytest.raises(pytest.skip.Exception,
|
with pytest.raises(pytest.skip.Exception):
|
||||||
"config.getvalueorskip('hello')")
|
config.getvalueorskip('hello')
|
||||||
|
|
||||||
def test_getoption(self, testdir):
|
def test_getoption(self, testdir):
|
||||||
config = testdir.parseconfig()
|
config = testdir.parseconfig()
|
||||||
|
|
Loading…
Reference in New Issue