- turn on capturing before early conftest loading and make terminal writer

use the original stream.

- avoid resetting capture FDs/sys.stdout for each test by keeping capturing
  always turned on and looking at snapshotted capturing data during runtest
  and collection phases.
This commit is contained in:
holger krekel
2014-03-14 12:49:36 +01:00
parent f43cda9681
commit 9777703e03
11 changed files with 181 additions and 122 deletions

View File

@@ -40,7 +40,7 @@ def pytest_addoption(parser):
def pytest_cmdline_main(config):
if config.option.markers:
config.do_configure()
tw = py.io.TerminalWriter()
tw = config.get_terminal_writer()
for line in config.getini("markers"):
name, rest = line.split(":", 1)
tw.write("@pytest.mark.%s:" % name, bold=True)