-
-
Notifications
You must be signed in to change notification settings - Fork 308
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
Move fixtures to tests
#1813
Move fixtures to tests
#1813
Conversation
note that tests are passing, but pre-commit and appveyor are not, presumably because there are too many files, leading to timeouts. |
an alternative is to revisit #146 and make these arrays smaller |
…nto array_fixture_fix
I think this is basically finished. A summary of the changes:
The diff is unreadable. I bundled the changes to the test code into a single commit to make this more reviewable. That's what reviewers should look at. pre-commit is failing due to mypy issues, but I can't replicate that locally and it's not due to changes in this PR |
In a separate effort, I just checked auto-generated fixture files into version control by mistake again 😮💨 can we get some eyes on this PR so we can fix this behavior. |
* v3: (22 commits) chore: update pre-commit hooks (zarr-developers#2051) Apply ruff/flake8-bandit rule B006 (zarr-developers#2049) Move fixtures to `tests` (zarr-developers#1813) Multiple imports for an import name (zarr-developers#2047) Redundant list comprehension (zarr-developers#2048) chore: update pre-commit hooks (zarr-developers#2039) Cast fill value to array's dtype (zarr-developers#2020) chore: update pre-commit hooks (zarr-developers#2017) make shardingcodec pickleable (zarr-developers#2011) doc: copy 3.0.0.alpha changelog into release.rst (zarr-developers#2007) build(ci): enable python 3.12 in github actions (zarr-developers#2005) Bump NumPy to 2.0 (zarr-developers#1983) chore: update pre-commit hooks (zarr-developers#1989) Fix indexing with bools (zarr-developers#1968) Fix string interpolation (zarr-developers#1998) Unnecessary comprehension (zarr-developers#1997) Stop ignoring these ruff rules (zarr-developers#2001) Merge collapsible if statements (zarr-developers#1999) Unnecessary comprehension (zarr-developers#1996) Handle Path in `make_store_path` (zarr-developers#1992) ...
* fix: move test fixtures into tests/fixture * fix: move test fixtures into tests/fixture * use tmpdir instead of data fixture * refactor fixture-depdendent tests * refactor fixture-depdendent tests * restore old tests, to try and make a clean commit, again * checkout updated test routines --------- Co-authored-by: Joe Hamman <[email protected]>
Move static fixtures from
fixture
totests/fixture
, and alter the corresponding tests to look for fixtures in the new location. These tests contained code for regenerating these fixtures if they were not found; I removed this code, because the fixtures are guaranteed to exist.I think generating fixtures at testing time is better than using static files, but the changes here were easier to make. Down the road we can deprecate the static fixtures in a separate PR.
Also, this diff is extremely unwieldy because of the large number of objects in the fixtures directory. Do we really need thousands of files here? Here are the test files modified by this PR:
Addresses #1812
TODO: