Skip to content
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

[Feature]: a way to disable all tests requiring dynamic downloads OR a static archive for test data #1801

Open
3 tasks done
TheChymera opened this issue Dec 12, 2023 · 4 comments
Assignees
Labels
category: enhancement improvements of code or code behavior priority: low alternative solution already working and/or relevant to only specific user(s) topic: testing issues related to testing

Comments

@TheChymera
Copy link

TheChymera commented Dec 12, 2023

What would you like to see added to PyNWB?

One of the tests ( tests/read_dandi/test_read_dandi.py::TestReadNWBDandisets::test_read_first_nwb_asset ) fails in a network sandbox.

Here is the full build log ( https://ppb.chymera.eu/4949b9.log ) but I think it's pretty clear what the issue is.

Is your feature request related to a problem?

No response

What solution would you like?

In case there will be more tests requiring network connectivity it would be great to either have an option to disable them globally (so they don't have to be explicitly listed subject to change etc.) or to have a static test data archive the checksum of which can be recorded.

Do you have any interest in helping implement the feature?

Yes, but I would need guidance.

Code of Conduct

@rly
Copy link
Contributor

rly commented Dec 12, 2023

disable them globally

How do other packages handle this? Would it be sufficient to check for an environment variable, e.g., PYNWB_NO_NETWORK_TESTS=1?

@TheChymera
Copy link
Author

@rly yes, that's how most packages do this.

@t-b
Copy link
Collaborator

t-b commented Dec 12, 2023

I actually prefer to use pytest markers for different properties of tests, see https://docs.pytest.org/en/6.2.x/example/markers.html#mark-run.

@oruebel
Copy link
Contributor

oruebel commented Dec 12, 2023

In the ros3 tests we use the following check to detect whether network (and ros3) are available to automatically skip the test.

https://github.com/NeurodataWithoutBorders/pynwb/blob/87a7c578e806f3679fc7b8c5e9777f382406db6a/tests/integration/ros3/test_ros3.py#L21C1-L27

We could do the same here.

@rly rly added category: enhancement improvements of code or code behavior topic: testing issues related to testing priority: low alternative solution already working and/or relevant to only specific user(s) labels Dec 14, 2023
@rly rly self-assigned this Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: enhancement improvements of code or code behavior priority: low alternative solution already working and/or relevant to only specific user(s) topic: testing issues related to testing
Projects
None yet
Development

No branches or pull requests

4 participants