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

[WIP] Alternative fix for stdout/stderr redirects #31

Conversation

kenodegard
Copy link
Contributor

An alternative to #25.

Benefits (?) of this implementation:

  • for tests marked as benchmarks (no fixture), the cache priming doesn't result in the same scope being run twice, e.g. the following works now:
    @pytest.mark.benchmark
    def test_tmp_path(tmp_path):
        (tmp_path / "random").mkdir()
    this is accomplished via code borrowed from pytest-rerunfailures, see pytest_codspeed.plugin.prime_cache

Submitting to see benchmark results.

Copy link

codspeed-hq bot commented Mar 26, 2024

CodSpeed Performance Report

Merging #31 will improve performances by 6.37%

Comparing kenodegard:fix-outerr-redirects-alternative (8541559) with master (90e639b)

Summary

⚡ 2 improvements
✅ 3 untouched benchmarks

Benchmarks breakdown

Benchmark master kenodegard:fix-outerr-redirects-alternative Change
test_iterative_fibo_10 45.5 µs 42.7 µs +6.37%
test_recursive_cached_fibo_10 113.8 µs 111.3 µs +2.25%

@kenodegard kenodegard force-pushed the fix-outerr-redirects-alternative branch from 0122316 to 7a3ba29 Compare March 26, 2024 19:03
@kenodegard kenodegard force-pushed the fix-outerr-redirects-alternative branch from 7a3ba29 to aaa7467 Compare March 26, 2024 19:05
@kenodegard
Copy link
Contributor Author

Closing in favor of #32

@kenodegard kenodegard closed this Apr 1, 2024
@kenodegard kenodegard deleted the fix-outerr-redirects-alternative branch September 9, 2024 16:10
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.

1 participant