Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

port --testsuite to pytest #1174

Merged
merged 1 commit into from
Jul 18, 2023
Merged

port --testsuite to pytest #1174

merged 1 commit into from
Jul 18, 2023

Conversation

asottile
Copy link
Member

No description provided.

Comment on lines -17 to -18
#: W292:1:36 noeol
# This line doesn't have a linefeed
Copy link
Member Author

Choose a reason for hiding this comment

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

there was a bug here! in python 3.8 this was reported 3 times. I didn't bother fixing the bug since it'll be "magically fixed" in python3.9+

I moved the test to its own file

@asottile asottile marked this pull request as ready for review July 18, 2023 00:10
@asottile asottile merged commit 7c04190 into main Jul 18, 2023
9 checks passed
@asottile asottile deleted the testsuite-pytest branch July 18, 2023 00:10
Comment on lines +29 to +30
sys.stdout = io.StringIO()
sys.stderr = io.StringIO()
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI, pytest already captures stdout and provides a way to access it: https://docs.pytest.org/en/6.2.x/capture.html#accessing-captured-output-from-a-test-function

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah I'm a pytest core dev

Copy link
Contributor

Choose a reason for hiding this comment

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

So, did you not use it for a certain reason or was it just (edit: not) within the scope of this PR?

Copy link
Member Author

Choose a reason for hiding this comment

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

it's a larger refactor and this was already large enough

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.

None yet

2 participants