Skip to content

fix: add capteesys, capsysbinary, capfd and capfdbinary to thread-unsafe fixtures#157

Merged
lysnikolaou merged 3 commits into
Quansight-Labs:mainfrom
mayeut:capsysbinary
Dec 19, 2025
Merged

fix: add capteesys, capsysbinary, capfd and capfdbinary to thread-unsafe fixtures#157
lysnikolaou merged 3 commits into
Quansight-Labs:mainfrom
mayeut:capsysbinary

Conversation

@mayeut

@mayeut mayeut commented Dec 14, 2025

Copy link
Copy Markdown
Contributor

capsysbinary fixture is not thread safe, same as capsys

@ngoldbaum

Copy link
Copy Markdown
Collaborator

I think we want to include all the fixtures listed in the first sentence of this section of the pytest docs: https://docs.pytest.org/en/stable/how-to/capture-stdout-stderr.html#accessing-captured-output-from-a-test-function

So, capsys, capteesys, capsysbinary, capfd, and capfdbinary.

@mayeut

mayeut commented Dec 14, 2025

Copy link
Copy Markdown
Contributor Author

I'll add them

@mayeut mayeut changed the title fix: add capsysbinary to thread-unsafe fixtures fix: add capteesys, capsysbinary, capfd and capfdbinary to thread-unsafe fixtures Dec 14, 2025
`capteesys` was introduced in pytest 8.4.0
@mayeut

mayeut commented Dec 14, 2025

Copy link
Copy Markdown
Contributor Author

I raised the minimum version of pytest to run tests as capteesys was introduced in pytest 8.4.0

@ngoldbaum ngoldbaum left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I noticed that there's a preexisting typo in the docs, monkeypatch is spelled monkeypath.

@lysnikolaou lysnikolaou left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @mayeut!

Only one comment regarding the change in pyproject.toml.

Comment thread pyproject.toml
@lysnikolaou lysnikolaou merged commit 91bb5b4 into Quansight-Labs:main Dec 19, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants