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

Fix progress report when tests fail during teardown #3110

Merged

Conversation

nicoddemus
Copy link
Member

Fix #3088

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.002%) to 92.609% when pulling 5939b33 on nicoddemus:progress-teardown-3088 into b0032ba on pytest-dev:features.

self._show_progress_info = (self.config.getoption('capture') != 'no' and
self.config.getini('console_output_style') == 'progress')
self._progress_nodeids_reported = set()
self._show_progress_info = (self.config.getoption('capture') != 'no' and not self.config.getoption('setupshow')
Copy link
Member

Choose a reason for hiding this comment

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

that condition is starting to look complex enough for putting it in a small 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.

Good idea, thanks. Done.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.002%) to 92.614% when pulling abbdb60 on nicoddemus:progress-teardown-3088 into b0032ba on pytest-dev:features.

@RonnyPfannschmidt RonnyPfannschmidt merged commit 01e37fe into pytest-dev:features Jan 12, 2018
@RonnyPfannschmidt
Copy link
Member

fabulous, thanks 👍

@nicoddemus nicoddemus deleted the progress-teardown-3088 branch January 12, 2018 10:27
blueyed added a commit to blueyed/pytest that referenced this pull request Feb 10, 2020
What's needed to fix pytest-dev#3088
seems to be checking for `rep.when == "setup"`.

This then needs adjustments though (to code done in
pytest-dev#3110) to make this work with
xdist.

It appears to make sense to split it into hooks that are run per test
(for eventually writing if past edge), and one that gets run at the end
really (not requiring to check for "last item" then).
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