Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions tests/test_track_b_b0_2_counts.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,17 @@
)


@pytest.fixture(autouse=True)
def _flush_the_real_streams():
"""Flush Python's original stdout and stderr before each test captures
anything. A plugin can leave text in them unflushed, as pytest-split
leaves its header when stdout is a pipe, and the script's own flush in
``_flush_streams`` would then push that text into the test's ``capfd``."""
for stream in (sys.__stdout__, sys.__stderr__):
if stream is not None:
stream.flush()


def _row(
person,
wave=2011,
Expand Down
Loading