Fixed linting.
This commit is contained in:
parent
0564b52c0e
commit
7ea4992f16
|
@ -14,7 +14,7 @@ from tempfile import TemporaryFile
|
|||
|
||||
import six
|
||||
import pytest
|
||||
from _pytest.compat import CaptureIO, dummy_context_manager
|
||||
from _pytest.compat import CaptureIO
|
||||
|
||||
patchsysdict = {0: "stdin", 1: "stdout", 2: "stderr"}
|
||||
|
||||
|
@ -759,4 +759,3 @@ def _attempt_to_close_capture_file(f):
|
|||
pass
|
||||
else:
|
||||
f.close()
|
||||
|
||||
|
|
|
@ -878,7 +878,6 @@ def test_live_logging_suspends_capture(has_capture_manager, request):
|
|||
import logging
|
||||
import contextlib
|
||||
from functools import partial
|
||||
from _pytest.capture import CaptureManager
|
||||
from _pytest.logging import _LiveLoggingStreamHandler
|
||||
|
||||
class MockCaptureManager:
|
||||
|
|
|
@ -1396,7 +1396,8 @@ def test_capture_with_live_logging(testdir):
|
|||
# capture should work with live cli logging
|
||||
|
||||
# Teardown report seems to have the capture for the whole process (setup, capture, teardown)
|
||||
testdir.makeconftest("""
|
||||
testdir.makeconftest(
|
||||
"""
|
||||
def pytest_runtest_logreport(report):
|
||||
if "test_global" in report.nodeid:
|
||||
if report.when == "teardown":
|
||||
|
@ -1404,7 +1405,8 @@ def test_capture_with_live_logging(testdir):
|
|||
f.write(report.caplog)
|
||||
with open("capstdout", "w") as f:
|
||||
f.write(report.capstdout)
|
||||
""")
|
||||
"""
|
||||
)
|
||||
|
||||
testdir.makepyfile(
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue