Skip to content

Commit

Permalink
Fix uv output shows with no verbose flag (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborbernat authored Oct 11, 2024
1 parent eb1075d commit a759339
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tox_uv/_run_lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ def _setup_env(self) -> None:
cmd.append("--no-install-project")
if self.options.verbosity > 3: # noqa: PLR2004
cmd.append("-v")
outcome = self.execute(cmd, stdin=StdinSource.OFF, run_id="uv-sync", show=self.options.verbosity > 1)
show = self.options.verbosity > 2 # noqa: PLR2004
outcome = self.execute(cmd, stdin=StdinSource.OFF, run_id="uv-sync", show=show)
outcome.assert_success()
if install_pkg is not None:
path = Path(install_pkg)
Expand Down
2 changes: 2 additions & 0 deletions tests/test_tox_uv_lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ def test_uv_lock_command(tox_project: ToxProjectCreator, verbose: str) -> None:
("py", "commands[0]", ["python", "hello"]),
]
assert calls == expected
show_uv_output = execute_calls.call_args_list[1].args[4]
assert show_uv_output is (bool(verbose))


def test_uv_lock_with_dev(tox_project: ToxProjectCreator) -> None:
Expand Down

0 comments on commit a759339

Please sign in to comment.