Skip to content

Commit

Permalink
fix: honour the skip option (#215)
Browse files Browse the repository at this point in the history
We fix a regression whereby the skip option was ignored if the base
venv did not exist, forcing the installation of the dev package
even when requested not to do so.
  • Loading branch information
P403n1x87 committed Jul 26, 2023
1 parent a666580 commit 27cfcfa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
fixes:
- |
Fixed a regression that prevented the skip option from being honored when
the base venv did not yet exist.
2 changes: 1 addition & 1 deletion riot/riot.py
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,7 @@ def generate_base_venvs(
except FileNotFoundError:
logger.error("Python version '%s' not found.", py)
else:
if not install_deps and skip_deps:
if not install_deps or skip_deps:
logger.info("Skipping global deps install.")
continue

Expand Down
8 changes: 0 additions & 8 deletions tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,10 +476,6 @@ def test_failure():
1 passed with 0 warnings, 0 failed\n""".lstrip(),
result.stdout,
), result.stdout
assert (
"No Python setup file found. Skipping dev package installation."
in result.stderr
)

result = tmp_run("riot run -s fail")
assert re.search(
Expand Down Expand Up @@ -529,10 +525,6 @@ def test_run_cmdargs(tmp_path: pathlib.Path, tmp_run: _T_TmpRun) -> None:
)
result = tmp_run("riot --pipe run -s test_cmdargs -- -k filter")
assert "cmdargs=-k filter" not in result.stdout
assert (
"No Python setup file found. Skipping dev package installation."
in result.stderr
)
assert result.returncode == 0

rf_path.write_text(
Expand Down

0 comments on commit 27cfcfa

Please sign in to comment.