-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Some packages (like sunpy) run most of their CI with --pyargs where the tests can have unpredictable paths (note these are not schema tests because I think this issue is leading them to not test their schemas with this plugin):
[gw3] [ 0%] PASSED ..\..\.tox\py312\Lib\site-packages\sunpy\image\tests\test_resample.py::test_reshape
..\..\.tox\py312\Lib\site-packages\sunpy\image\tests\test_transform.py::test_rotation[90.0-1]
[gw2] [ 0%] PASSED ..\..\.tox\py312\Lib\site-packages\sunpy\coordinates\tests\test_transformations.py::test_hci_hci
..\..\.tox\py312\Lib\site-packages\sunpy\coordinates\tests\test_transformations.py::test_hme_gei_sunspice
Note the including of .tox\py312\Lib. This does not place nice with the asdf_schema_root:
| parser.addini("asdf_schema_root", "Root path indicating where schemas are stored") |
One possibility is to change (or augment) the current path-based configuration to something uri based. Something like asdf_schema_uri_pattern with perhaps a uri pattern (supporting wildcards) that pytest-asdf-plugin will use to find schemas to test.
Pros:
- compatible with
--pyargsand non-pyargsruns - the plugin can check if the
idmatches the registereduri(which isn't guaranteed and is often tested separately)
Cons:
- requires schemas to be registered with asdf (which I think is the case for all packages)
- will miss bugs in schema registration where if a schema isn't registered it will be silently ignored (there is not anything that currently checks this so it's not a new issue)
Metadata
Metadata
Assignees
Labels
No labels