Skip to content

Commit

Permalink
chore: adds better test
Browse files Browse the repository at this point in the history
  • Loading branch information
slush committed Sep 17, 2024
1 parent 83df349 commit 98982c1
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/integration/cli/test_pm.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,20 @@ def test_uninstall(pm_runner, integ_project):
assert expected_message in result.output or result._completed_process.stderr


@skip_projects_except("only-dependencies")
def test_uninstall_by_long_name(pm_runner, integ_project):
pm_runner.project = integ_project
package_name = "dependency-in-project-only"
package_long_name = integ_project.dependencies.get_dependency(package_name, "local").package_id

# Install packages
pm_runner.invoke("install", ".", "--force")
result = pm_runner.invoke("uninstall", package_long_name, "--yes")
expected_message = f"Uninstalled '{package_name}=local'."
assert result.exit_code == 0, result.output or result._completed_process.stderr
assert expected_message in result.output or result._completed_process.stderr


@skip_projects_except("only-dependencies")
def test_uninstall_not_exists(pm_runner, integ_project):
pm_runner.project = integ_project
Expand Down

0 comments on commit 98982c1

Please sign in to comment.