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

Let the test battery honor DATALAD_TESTS_NONETWORK #504

Merged
merged 1 commit into from
Oct 23, 2023

Conversation

mih
Copy link
Member

@mih mih commented Oct 23, 2023

This is primarily achieved via a custom pytest mark. However, there is a session-level fixture that itself depends on network access. Unlike with a function-level fixture, I cannot figure out how to make any dependent test be skipped. Instead, I need to use the mark as a skipping decorator.

With these changes I can successfully run the test suite on a system with no network access (not just a proxy-based diversion):

247 passed, 39 skipped, 19 warnings in 171.10s (0:02:51)

Ping #490

This is primarily achieved via a custom pytest mark. However, there is a
session-level fixture that itself depends on network access. Unlike with
a function-level fixture, I cannot figure out how to make any dependent
test be skipped. Instead, I need to use the mark as a skipping
decorator.

With these changes I can successfully run the test suite on a system
with no network access (not just a proxy-based diversion):

```
247 passed, 39 skipped, 19 warnings in 171.10s (0:02:51)
```

Ping datalad#490
@mih mih added the semver-patch PR implies patch-level version increment (API stable) label Oct 23, 2023
@mih mih added this to the 1.0.2 milestone Oct 23, 2023
@codecov
Copy link

codecov bot commented Oct 23, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (33b8f51) 92.41% compared to head (5dfa5f6) 92.46%.
Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #504      +/-   ##
==========================================
+ Coverage   92.41%   92.46%   +0.04%     
==========================================
  Files         126      127       +1     
  Lines        9577     9593      +16     
  Branches     1036     1037       +1     
==========================================
+ Hits         8851     8870      +19     
+ Misses        704      700       -4     
- Partials       22       23       +1     
Files Coverage Δ
...alad_next/archive_operations/tests/test_tarfile.py 100.00% <100.00%> (ø)
...lad_next/commands/tests/test_ls_file_collection.py 100.00% <100.00%> (ø)
...atalad_next/iter_collections/tests/test_itertar.py 100.00% <100.00%> (ø)
..._next/patches/tests/test_annex_progress_logging.py 100.00% <100.00%> (ø)
datalad_next/tests/marker.py 100.00% <100.00%> (ø)
datalad_next/url_operations/tests/test_http.py 60.43% <100.00%> (+0.78%) ⬆️
datalad_next/tests/fixtures.py 93.42% <50.00%> (-0.58%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mih mih merged commit dd95458 into datalad:main Oct 23, 2023
5 checks passed
@mih mih deleted the tst-nonetwork branch October 23, 2023 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-patch PR implies patch-level version increment (API stable)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant