Fixed linting.

This commit is contained in:
victor 2018-08-19 15:46:02 +02:00
parent 0564b52c0e
commit 7ea4992f16
3 changed files with 6 additions and 6 deletions

View File

@ -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()

View File

@ -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:

View File

@ -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(
"""
@ -1413,7 +1415,7 @@ def test_capture_with_live_logging(testdir):
import pytest
logger = logging.getLogger(__name__)
@pytest.fixture
def fix1():
print("fix setup")