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

Improve test coverage: CLI #614

Merged
merged 5 commits into from
Nov 13, 2023
Merged

Conversation

jsignell
Copy link
Member

@jsignell jsignell commented Nov 10, 2023

Related Issue(s):

Description:

Tackling test coverage in the CLI. I found one bug, one confusing behavior, and one old deprecation.

After this PR:

---------- coverage: platform linux, python 3.11.6-final-0 -----------
Name                                 Stmts   Miss  Cover   Missing
------------------------------------------------------------------
pystac_client/__init__.py                7      0   100%
pystac_client/_utils.py                 11      0   100%
pystac_client/cli.py                   151      5    97%   100-101, 367-369
pystac_client/client.py                149     10    93%   45, 353, 356, 374-375, 405-408, 428
pystac_client/collection_client.py      80      8    90%   27-29, 97, 101, 108, 181, 193-194
pystac_client/conformance.py            29      3    90%   30, 35, 38
pystac_client/errors.py                  3      0   100%
pystac_client/exceptions.py             10      0   100%
pystac_client/item_search.py           367     21    94%   34, 46, 97-100, 128, 283, 292, 321, 366, 374, 395-397, 417, 514, 543, 550, 565, 574, 612, 676, 749
pystac_client/mixins.py                 37      2    95%   19, 52
pystac_client/stac_api_io.py           114     10    91%   36-37, 210, 213-215, 220-221, 225, 280
pystac_client/version.py                 1      0   100%
pystac_client/warnings.py               29      4    86%   92-96
------------------------------------------------------------------
TOTAL                                  988     63    94%

PR Checklist:

  • Code is formatted
  • Tests pass
  • Changes are added to the CHANGELOG

@codecov-commenter
Copy link

codecov-commenter commented Nov 10, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Files Coverage Δ
pystac_client/cli.py 95.42% <100.00%> (+22.46%) ⬆️

... and 1 file with indirect coverage changes

📢 Thoughts on this report? Let us know!

pystac_client/cli.py Show resolved Hide resolved
pystac_client/cli.py Show resolved Hide resolved
pystac_client/cli.py Outdated Show resolved Hide resolved
pystac_client/cli.py Show resolved Hide resolved
pystac_client/cli.py Outdated Show resolved Hide resolved
@jsignell jsignell enabled auto-merge (squash) November 13, 2023 15:12
@jsignell jsignell merged commit 1eaf0d9 into stac-utils:main Nov 13, 2023
17 checks passed
@jsignell jsignell deleted the more-cli-tests branch November 13, 2023 15:39
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.

None yet

3 participants