Skip to content

test(global): add @pytest.mark.local marker for local-only tests (#170)#170

Merged
tiborsimko merged 8 commits intocernopendata:masterfrom
tiborsimko:mark-local-tests
Dec 17, 2025
Merged

test(global): add @pytest.mark.local marker for local-only tests (#170)#170
tiborsimko merged 8 commits intocernopendata:masterfrom
tiborsimko:mark-local-tests

Conversation

@tiborsimko
Copy link
Member

Mark tests that run without network access with @pytest.mark.local, allowing quick test runs during development. Remote tests (connecting to the CERN Open Data portal) remain unmarked and run by default.

tiborsimko added a commit to tiborsimko/cernopendata-client that referenced this pull request Dec 17, 2025
…nopendata#170)

Mark tests that run without network access with @pytest.mark.local,
allowing quick test runs during development. Remote tests (connecting to
the CERN Open Data portal) remain unmarked and run by default.
@codecov
Copy link

codecov bot commented Dec 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.54%. Comparing base (b6daa50) to head (a93d2be).
⚠️ Report is 8 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #170      +/-   ##
==========================================
+ Coverage   80.88%   82.54%   +1.65%     
==========================================
  Files          12       12              
  Lines         722      716       -6     
==========================================
+ Hits          584      591       +7     
+ Misses        138      125      -13     
Files with missing lines Coverage Δ
cernopendata_client/searcher.py 87.85% <100.00%> (+1.48%) ⬆️
cernopendata_client/validator.py 100.00% <ø> (+3.33%) ⬆️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

tiborsimko added a commit to tiborsimko/cernopendata-client that referenced this pull request Dec 17, 2025
…nopendata#170)

Mark tests that run without network access with @pytest.mark.local,
allowing quick test runs during development. Remote tests (connecting to
the CERN Open Data portal) remain unmarked and run by default.
tiborsimko added a commit to tiborsimko/cernopendata-client that referenced this pull request Dec 17, 2025
Fix test_validate_retry_limit and test_validate_retry_sleep to call
the correct validation functions instead of validate_recid.
tiborsimko added a commit to tiborsimko/cernopendata-client that referenced this pull request Dec 17, 2025
…#170)

Remove dead code checking for Python 2 unicode type in
validate_directory().
tiborsimko added a commit to tiborsimko/cernopendata-client that referenced this pull request Dec 17, 2025
)

Remove try/except fallback for importing quote from urllib
that is no longer necessary for Python 3.8+ project.
tiborsimko added a commit to tiborsimko/cernopendata-client that referenced this pull request Dec 17, 2025
…ndata#170)

Add test case for using --filter without --output-value flag,
which should display an error message.
tiborsimko added a commit to tiborsimko/cernopendata-client that referenced this pull request Dec 17, 2025
Add test case for list-directory command when directory is empty,
using mock to return empty file list.
tiborsimko added a commit to tiborsimko/cernopendata-client that referenced this pull request Dec 17, 2025
Add unit tests for filter_matching_output and filter_metadata. Test when
output_field is not in matching object. Test multiple matches without
output_field. Test handling of $schema field in output_json.
tiborsimko added a commit to tiborsimko/cernopendata-client that referenced this pull request Dec 17, 2025
…endata#170)

Add local unit tests for downloader filter functions.
get_download_files_by_name: single, multiple, no match.
get_download_files_by_regexp: extension, pattern, pre-filtered, no
match. get_download_files_by_range: single, multiple, single file,
pre-filtered.
…nopendata#170)

Mark tests that run without network access with @pytest.mark.local,
allowing quick test runs during development. Remote tests (connecting to
the CERN Open Data portal) remain unmarked and run by default.
Fix test_validate_retry_limit and test_validate_retry_sleep to call
the correct validation functions instead of validate_recid.
…#170)

Remove dead code checking for Python 2 unicode type in
validate_directory().
)

Remove try/except fallback for importing quote from urllib
that is no longer necessary for Python 3.8+ project.
…ndata#170)

Add test case for using --filter without --output-value flag,
which should display an error message.
Add test case for list-directory command when directory is empty,
using mock to return empty file list.
Add unit tests for filter_matching_output and filter_metadata. Test when
output_field is not in matching object. Test multiple matches without
output_field. Test handling of $schema field in output_json.
…endata#170)

Add local unit tests for downloader filter functions.
get_download_files_by_name: single, multiple, no match.
get_download_files_by_regexp: extension, pattern, pre-filtered, no
match. get_download_files_by_range: single, multiple, single file,
pre-filtered.
@tiborsimko tiborsimko merged commit a93d2be into cernopendata:master Dec 17, 2025
24 checks passed
@tiborsimko tiborsimko deleted the mark-local-tests branch December 17, 2025 12:26
@tiborsimko tiborsimko self-assigned this Dec 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants