Skip to content

Commit

Permalink
modernize: new output style used in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aurzenligl committed Feb 21, 2024
1 parent 2ebe624 commit 86fab9f
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions tests/test_pytest_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,6 @@ def basetemp(pytester):
return pytester.path.parent / 'basetemp'


@pytest.fixture(autouse=True)
def set_classic_output(monkeypatch, pytester):
runpytest = pytester.runpytest

def wrapper(*args, **kwargs):
return runpytest('--override-ini=console_output_style=classic', *args, **kwargs)

monkeypatch.setattr(pytester, 'runpytest', wrapper)


@pytest.fixture
def conftest_py(pytester):
return makefile(pytester.path / 'conftest.py', """
Expand Down Expand Up @@ -135,7 +125,7 @@ def test_case():
assert result.ret == 0
result.stdout.fnmatch_lines([
'',
'test_case.py .',
'test_case.py . *',
'',
])

Expand Down Expand Up @@ -734,15 +724,6 @@ def pytest_logger_config(logger_config):
assert result.ret == 0


@pytest.mark.skip("Since pytest v3.3 progress percentage is being displayed by default during test execution. "
"It interferes with most of the old test cases that assert stdout/err so to not change them, we are "
"now forcing classic output with a set_classic_output auto-use fixture which overrides pytest's "
"console_output_style. We could have at least one test that proves the plugin can work in the new"
"default mode as well.")
def test_works_with_progress_percentage_prints():
assert False


def test_collects_teardown_logs(pytester):
makefile(pytester.path / 'conftest.py', """
def pytest_logger_config(logger_config):
Expand Down

0 comments on commit 86fab9f

Please sign in to comment.