Skip to content

Conversation

dstansby
Copy link
Contributor

When a pytest.skip() is executed it skips the entire running test, not just the current for loop. This means putting a pytest.skip() inside a for loop can accidentally skip tests. The fix here is to parametrize the tests instead of using for loops.

Copy link

codecov bot commented Apr 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.96%. Comparing base (58bc9c4) to head (5fdc358).
Report is 8 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #738   +/-   ##
=======================================
  Coverage   99.96%   99.96%           
=======================================
  Files          63       63           
  Lines        2738     2738           
=======================================
  Hits         2737     2737           
  Misses          1        1           
Files with missing lines Coverage Δ
numcodecs/tests/common.py 100.00% <100.00%> (ø)
numcodecs/tests/test_blosc.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jakirkham jakirkham merged commit 85eeed3 into zarr-developers:main Apr 11, 2025
30 checks passed
@jakirkham
Copy link
Member

Thanks David! 🙏

@dstansby dstansby deleted the unskip-tests branch April 11, 2025 07:09
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.

2 participants