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

fix: avoid mistakenly passing command-line arguments while testing #2084

Merged
merged 1 commit into from
Jul 5, 2023

Conversation

leemars
Copy link
Contributor

@leemars leemars commented Jul 5, 2023

Pull Request Checklist

  • A news fragment is added in news/ describing what is new.
  • Test cases added for changed code.

Describe what you have changed in this PR.

  • Separate the use cases for CLI and API
  • for CLI usage, pass args or sys.argv[1:] as args to Core
  • for API usage, use [] instead of sys.argv[1:] as default value of args, if args is None

This PR will fix #2083.

@codecov-commenter
Copy link

codecov-commenter commented Jul 5, 2023

Codecov Report

Patch coverage: 25.00% and project coverage change: -0.02 ⚠️

Comparison is base (b584107) 84.56% compared to head (164b884) 84.54%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2084      +/-   ##
==========================================
- Coverage   84.56%   84.54%   -0.02%     
==========================================
  Files         100      100              
  Lines        9646     9648       +2     
  Branches     2111     2112       +1     
==========================================
  Hits         8157     8157              
- Misses       1033     1034       +1     
- Partials      456      457       +1     
Flag Coverage Δ
unittests 84.31% <25.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/pdm/core.py 91.61% <25.00%> (-1.20%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@frostming frostming merged commit 70f557d into pdm-project:main Jul 5, 2023
@leemars leemars deleted the fix-argv branch July 5, 2023 14:46
@j178 j178 mentioned this pull request Apr 3, 2024
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.

The command-line arguments were mistakenly passed to the test object when running tests
3 participants