-
Notifications
You must be signed in to change notification settings - Fork 90
Skip streaming test if offline #2113
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #2113 +/- ##
=======================================
Coverage 95.21% 95.21%
=======================================
Files 28 28
Lines 2840 2840
Branches 729 729
=======================================
Hits 2704 2704
Misses 80 80
Partials 56 56
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
tests/integration/hdf5/test_io.py
Outdated
| read_nwbfile = NWBHDF5IO.read_nwb(path=s3_test_path) | ||
| assert read_nwbfile.identifier == "3f77c586-6139-4777-a05d-f603e90b1330" | ||
| assert read_nwbfile.subject.subject_id == "1" | ||
| except FileNotFoundError: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could also test the URL to be more specific for connectivity issues like in the ROS3 tests, but I think either works!
pynwb/tests/integration/ros3/test_ros3.py
Lines 23 to 26 in f56b6f4
| try: | |
| urllib.request.urlopen('https://dandiarchive.s3.amazonaws.com/ros3test.nwb', timeout=1) | |
| except urllib.request.URLError: | |
| self.skipTest("Internet access to DANDI failed. Skipping all Ros3 streaming tests.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I didn't realize that urllib.request.urlopen simply opens the connection but does not download the file. Will update
Motivation
Tests should pass when I'm on a plane without internet.
Checklist
ruff check . && codespellfrom the source directory.