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

pytest_runtest_call: Avoid running every test twice #3

Merged
merged 1 commit into from
Mar 11, 2023

Conversation

dnouri
Copy link
Contributor

@dnouri dnouri commented Dec 10, 2021

Instead of calling runtest ourselves, we decorate it, and let pytest's
default implementation run our decorated function.

This fixes #1
which apart from impacting performance can lead to subtle issues when
running tests. (In other words, I bumped my head hard. :-)

Instead of calling runtest ourselves, we decorate it, and let pytest's
default implementation run our decorated function.

This fixes mgaitan#1
which apart from impacting performance can lead to subtle issues when
running tests.  (In other words, I bumped my head hard. :-)
@nathanleiby
Copy link

Today I hit a confusing bug in other tests (a caching related unit test ran twice :D)! Would love to get this fix merged in. Thanks!

@theRealSuperMario
Copy link

Yes, I would also love to get this across the finish line. Any plans?

@mgaitan mgaitan merged commit c7d002a into mgaitan:main Mar 11, 2023
@daya0576
Copy link

daya0576 commented Aug 3, 2023

@mgaitan Could you publish the latest version of the code?

@mgaitan
Copy link
Owner

mgaitan commented Aug 9, 2023

I will do it ASAP, meanwhile installing from the zip pip install https://github.com/mgaitan/pytest-line-profiler/archive/refs/heads/main.zip should woks

@mgaitan
Copy link
Owner

mgaitan commented Aug 10, 2023

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.

Functions called twice within tests when calling pytest (not using line profiling)
5 participants