Skip to content

Commit

Permalink
add more test
Browse files Browse the repository at this point in the history
  • Loading branch information
huxuan committed Apr 23, 2024
1 parent fb433b0 commit e354c05
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_reinstall_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ def test_reinstall_all(pipx_temp_env, capsys):
assert not run_pipx_cli(["reinstall-all", "--python", sys.executable])


def test_reinstall_all_none(pipx_temp_env, capsys):
assert not run_pipx_cli(["reinstall-all"])
captured = capsys.readouterr()
assert "No packages reinstalled after running 'pipx reinstall-all'" in captured.out


@pytest.mark.parametrize("metadata_version", PIPX_METADATA_LEGACY_VERSIONS)
def test_reinstall_all_legacy_venv(pipx_temp_env, capsys, metadata_version):
assert not run_pipx_cli(["install", "pycowsay"])
Expand Down
6 changes: 6 additions & 0 deletions tests/test_upgrade_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ def test_upgrade_all(pipx_temp_env, capsys):
assert not run_pipx_cli(["upgrade-all"])


def test_upgrade_all_none(pipx_temp_env, capsys):
assert not run_pipx_cli(["upgrade-all"])
captured = capsys.readouterr()
assert "No packages upgraded after running 'pipx upgrade-all'" in captured.out


@pytest.mark.parametrize("metadata_version", PIPX_METADATA_LEGACY_VERSIONS)
def test_upgrade_all_legacy_venv(pipx_temp_env, capsys, caplog, metadata_version):
assert run_pipx_cli(["upgrade", "pycowsay"])
Expand Down

0 comments on commit e354c05

Please sign in to comment.