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

Fix bugs where VCS dev-dependencies are poetry install/show even in --no-dev #996

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
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
Prev Previous commit
Add test ensuring solver marks git dev-dependencies as dev
nyanpasu64 committed Nov 16, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 8a09217405f3fbaf44caf497124ef65c92141223
24 changes: 24 additions & 0 deletions tests/puzzle/test_solver.py
Original file line number Diff line number Diff line change
@@ -986,6 +986,30 @@ def test_solver_can_resolve_git_dependencies_with_ref(solver, repo, package, ref
assert op.package.source_reference.startswith("9cf87a2")


def test_solver_marks_git_dev_dependencies_as_dev(solver, repo, package):
pendulum = get_package("pendulum", "2.0.3")
cleo = get_package("cleo", "1.0.0")
repo.add_package(pendulum)
repo.add_package(cleo)

package.add_dependency(
"demo", {"git": "https://github.com/demo/demo.git"}, category="dev"
)

ops = solver.solve()

check_solver_result(
ops,
[
{"job": "install", "package": pendulum},
{"job": "install", "package": get_package("demo", "0.1.2")},
],
)

assert ops[0].package.category == "dev"
assert ops[1].package.category == "dev"


def test_solver_does_not_trigger_conflict_for_python_constraint_if_python_requirement_is_compatible(
solver, repo, package
):