merge from master to features

This commit is contained in:
Ronny Pfannschmidt
2018-06-26 17:00:11 +02:00
112 changed files with 1064 additions and 1227 deletions

View File

@@ -18,7 +18,6 @@ def test_coloredlogformatter():
)
class ColorConfig(object):
class option(object):
pass
@@ -26,9 +25,8 @@ def test_coloredlogformatter():
tw.hasmarkup = True
formatter = ColoredLevelFormatter(tw, logfmt)
output = formatter.format(record)
assert (
output
== ("dummypath 10 " "\x1b[32mINFO \x1b[0m Test Message")
assert output == (
"dummypath 10 " "\x1b[32mINFO \x1b[0m Test Message"
)
tw.hasmarkup = False

View File

@@ -520,16 +520,22 @@ def test_sections_single_new_line_after_test_outcome(testdir, request):
"=* 1 passed in *=",
]
)
assert re.search(
r"(.+)live log teardown(.+)\n(.+)WARNING(.+)\n(.+)WARNING(.+)",
result.stdout.str(),
re.MULTILINE,
) is not None
assert re.search(
r"(.+)live log finish(.+)\n(.+)WARNING(.+)\n(.+)WARNING(.+)",
result.stdout.str(),
re.MULTILINE,
) is not None
assert (
re.search(
r"(.+)live log teardown(.+)\n(.+)WARNING(.+)\n(.+)WARNING(.+)",
result.stdout.str(),
re.MULTILINE,
)
is not None
)
assert (
re.search(
r"(.+)live log finish(.+)\n(.+)WARNING(.+)\n(.+)WARNING(.+)",
result.stdout.str(),
re.MULTILINE,
)
is not None
)
def test_log_cli_level(testdir):
@@ -850,7 +856,6 @@ def test_live_logging_suspends_capture(has_capture_manager, request):
assert CaptureManager.resume_global_capture
class DummyTerminal(six.StringIO):
def section(self, *args, **kwargs):
pass
@@ -865,10 +870,10 @@ def test_live_logging_suspends_capture(has_capture_manager, request):
logger.critical("some message")
if has_capture_manager:
assert (
MockCaptureManager.calls
== ["suspend_global_capture", "resume_global_capture"]
)
assert MockCaptureManager.calls == [
"suspend_global_capture",
"resume_global_capture",
]
else:
assert MockCaptureManager.calls == []
assert out_file.getvalue() == "\nsome message\n"