Skip to content

Conversation

@ianhi
Copy link
Contributor

@ianhi ianhi commented Jul 2, 2025

Fixess the test test failures introduced by #10469

That PR introduced a new test that used the time_unit fixture which is scoped to module. This was somehow resulting in leakage of state across tests. Normally this doesn't seem to matter (e.g. other fixtures also use that scope) but it was affecting the get/set counting.

See also: https://docs.pytest.org/en/stable/how-to/fixtures.html#fixture-scopes

This also reverts: 8d2e563 to restore the initial values

@maxrjones your bisecting was very helpful! also @TomNicholas

  • Closes #xxxx
  • [NA] Tests added
  • [NA] User visible changes (including notable bug fixes) are documented in whats-new.rst
  • [NA] New functions/methods are listed in api.rst

Copy link
Member

@TomNicholas TomNicholas left a comment

Choose a reason for hiding this comment

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

Well done!!

@ianhi
Copy link
Contributor Author

ianhi commented Jul 2, 2025

I'm still pretty confused as to how this was contaminating relevant between the tests (seemingly zarr_format) but worth noting that "function" is the default scope so we shoudl consider changing the datatree fixture to a smaller scope

@spencerkclark
Copy link
Member

Nice catch!

@dcherian dcherian changed the title Fix Zarr test isolation - HTTP GET/Set failures Fix Zarr 'number of requests' test Jul 3, 2025
@dcherian dcherian merged commit 12022cc into pydata:main Jul 3, 2025
33 checks passed
@ianhi ianhi deleted the fix-zarr-test-isolation branch July 3, 2025 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants