You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the tests are stored in a flat on-disk layout, but some test files are logically grouped, e.g. the relationship between test_backends_api.py and test_backends_common.py could be expressed via a directory structure, like test/backends/test_api.py and test/backends/test_common.py.
Relatedly, some of the test files are a bit long -- test_backends.py is 6500 lines, and it contains tests for zarr and netcdf (and maybe other things). If someone is just working on the zarr side of things, then the netcdf tests are thousands of lines of clutter that could in principle be entirely contained in a separate test file.
So my proposal would be to judiciously group logically related tests into modules , e.g. test_backends would be one, and also split large test files into smaller independent components, e.g. test_backends/test_zarr.py would just test the zarr backend stuff.
Does this seem reasonable?
The text was updated successfully, but these errors were encountered:
I had a quick look at whether we could break up dataset.py, which is now 11K lines long. The short answer is that it's not easy — it's mostly doctrings, there's maybe 1-2K LOC of functions we could move the main logic and leave a wrapper — curvefit, polyfit, interp, a few utility functions. And it's not really possible in python to have class definitions in more than one file.
That is separate from breaking up the tests, still worthwhile if we can slim it down a bit. But no easy great solution.
What is your issue?
Currently the tests are stored in a flat on-disk layout, but some test files are logically grouped, e.g. the relationship between
test_backends_api.py
andtest_backends_common.py
could be expressed via a directory structure, liketest/backends/test_api.py
andtest/backends/test_common.py
.Relatedly, some of the test files are a bit long --
test_backends.py
is 6500 lines, and it contains tests for zarr and netcdf (and maybe other things). If someone is just working on the zarr side of things, then the netcdf tests are thousands of lines of clutter that could in principle be entirely contained in a separate test file.So my proposal would be to judiciously group logically related tests into modules , e.g.
test_backends
would be one, and also split large test files into smaller independent components, e.g.test_backends/test_zarr.py
would just test the zarr backend stuff.Does this seem reasonable?
The text was updated successfully, but these errors were encountered: