"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/mixology/version_solver/test_python_constraint.py" between
poetry-1.1.15.tar.gz and poetry-1.2.0.tar.gz

About: Poetry is a tool for dependency management and packaging in Python.

test_python_constraint.py  (poetry-1.1.15):test_python_constraint.py  (poetry-1.2.0)
from __future__ import annotations
from typing import TYPE_CHECKING
from poetry.factory import Factory from poetry.factory import Factory
from tests.mixology.helpers import add_to_repo
from tests.mixology.helpers import check_solver_result
if TYPE_CHECKING:
from poetry.core.packages.project_package import ProjectPackage
from ..helpers import add_to_repo from poetry.repositories import Repository
from ..helpers import check_solver_result from tests.mixology.version_solver.conftest import Provider
def test_dependency_does_not_match_root_python_constraint(root, provider, repo): def test_dependency_does_not_match_root_python_constraint(
root: ProjectPackage, provider: Provider, repo: Repository
):
provider.set_package_python_versions("^3.6") provider.set_package_python_versions("^3.6")
root.add_dependency(Factory.create_dependency("foo", "*")) root.add_dependency(Factory.create_dependency("foo", "*"))
add_to_repo(repo, "foo", "1.0.0", python="<3.5") add_to_repo(repo, "foo", "1.0.0", python="<3.5")
error = """The current project's Python requirement (>=3.6,<4.0) \ error = """\
is not compatible with some of the required packages Python requirement: The current project's Python requirement (>=3.6,<4.0) is not compatible with som
e of\
the required packages Python requirement:
- foo requires Python <3.5, so it will not be satisfied for Python >=3.6,<4.0 - foo requires Python <3.5, so it will not be satisfied for Python >=3.6,<4.0
Because no versions of foo match !=1.0.0 Because no versions of foo match !=1.0.0
and foo (1.0.0) requires Python <3.5, foo is forbidden. and foo (1.0.0) requires Python <3.5, foo is forbidden.
So, because myapp depends on foo (*), version solving failed.""" So, because myapp depends on foo (*), version solving failed."""
check_solver_result(root, provider, error=error) check_solver_result(root, provider, error=error)
 End of changes. 5 change blocks. 
5 lines changed or deleted 18 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)