-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Open
Labels
plugin: capturerelated to the capture builtin pluginrelated to the capture builtin plugintype: bugproblem that needs to be addressedproblem that needs to be addressed
Description
I have to suspend the global capture, because I ask the user for some user input in my pytest plugin.
But this leads to a changed terminal width.
conftest.py
import pytest
import shutil
@pytest.hookimpl(trylast=True)
def pytest_sessionfinish(session):
capture = session.config.pluginmanager.getplugin("capturemanager")
capture.suspend_global_capture(in_=True)
# some code to read user input
print(shutil.get_terminal_size())
capture.resume_global_capture()
print(shutil.get_terminal_size())
The ===
in the no tests ran line are shorter than above and the result of get_terminal_size
changed.
pytest: 8.3.5
os: Debian
I performed this test in a directory that only contained the specified file conftest.py
.
slafs, MRigal and slingshotsys
Metadata
Metadata
Assignees
Labels
plugin: capturerelated to the capture builtin pluginrelated to the capture builtin plugintype: bugproblem that needs to be addressedproblem that needs to be addressed