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

tests: remove duplicate #9281

Merged
merged 1 commit into from
Apr 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions tests/console/commands/test_add.py
Original file line number Diff line number Diff line change
Expand Up @@ -1313,41 +1313,6 @@ def test_add_with_lock(
assert content_hash != app.poetry.locker.lock_data["metadata"]["content-hash"]


def test_add_to_section_that_does_no_exist_yet(
app: PoetryTestApplication,
repo: TestRepository,
tester: CommandTester,
) -> None:
repo.add_package(get_package("cachy", "0.1.0"))
repo.add_package(get_package("cachy", "0.2.0"))

tester.execute("cachy --group dev")

expected = """\
Using version ^0.2.0 for cachy

Updating dependencies
Resolving dependencies...

Package operations: 1 install, 0 updates, 0 removals

- Installing cachy (0.2.0)

Writing lock file
"""

assert tester.io.fetch_output() == expected

assert isinstance(tester.command, InstallerCommand)
assert tester.command.installer.executor.installations_count == 1

pyproject: dict[str, Any] = app.poetry.file.read()
content = pyproject["tool"]["poetry"]

assert "cachy" in content["group"]["dev"]["dependencies"]
assert content["group"]["dev"]["dependencies"]["cachy"] == "^0.2.0"


def test_add_keyboard_interrupt_restore_content(
poetry_with_up_to_date_lockfile: Poetry,
repo: TestRepository,
Expand Down