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

feat: let users specify pytest command #322

Merged
merged 1 commit into from
Oct 31, 2023
Merged

Conversation

giovanni-guidini
Copy link
Contributor

context: codecov/engineering-team#715

Apparently some users don't have a virtualenv or don't install packages globaly.
In this case running python -m pytest doesn't work because pytest is not accessible to the
global python.

These changes let users specify a different command to run, so that they can tell
the PytestStandardRunner where to find pytest.

In terms of security it's not more dangerous than having a DAN runner, so should be ok.

context: codecov/engineering-team#715

Apparently some users don't have a virtualenv or don't install packages globaly.
In this case running `python -m pytest` doesn't work because pytest is not accessible to the
global python.

These changes let users specify a different command to run, so that they can tell
the PytestStandardRunner where to find `pytest`.

In terms of security it's not more dangerous than having a DAN runner, so should be ok.
@codecov
Copy link

codecov bot commented Oct 30, 2023

Codecov Report

Merging #322 (04b0f34) into main (ce47206) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #322      +/-   ##
==========================================
+ Coverage   95.52%   95.53%   +0.01%     
==========================================
  Files          79       79              
  Lines        2747     2754       +7     
==========================================
+ Hits         2624     2631       +7     
  Misses        123      123              
Flag Coverage Δ
python3.10 95.65% <100.00%> (+0.01%) ⬆️
python3.11 95.64% <100.00%> (+0.01%) ⬆️
python3.8 95.65% <100.00%> (+0.01%) ⬆️
python3.9 95.65% <100.00%> (+0.01%) ⬆️
smart-labels 95.52% <100.00%> (+0.01%) ⬆️

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

Files Coverage Δ
codecov_cli/runners/pytest_standard_runner.py 100.00% <100.00%> (ø)

@giovanni-guidini giovanni-guidini merged commit cfade87 into main Oct 31, 2023
14 checks passed
@giovanni-guidini giovanni-guidini deleted the gio/pytest-cmd-prefix branch October 31, 2023 12:45
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