"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/mixology/version_solver/conftest.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.

conftest.py  (poetry-1.1.15):conftest.py  (poetry-1.2.0)
import pytest from __future__ import annotations
from typing import TYPE_CHECKING
from clikit.io import NullIO import pytest
from cleo.io.null_io import NullIO
from poetry.core.packages.project_package import ProjectPackage from poetry.core.packages.project_package import ProjectPackage
from poetry.puzzle.provider import Provider as BaseProvider from poetry.puzzle.provider import Provider as BaseProvider
from poetry.repositories import Pool from poetry.repositories import Pool
from poetry.repositories import Repository from poetry.repositories import Repository
if TYPE_CHECKING:
from tests.helpers import TestRepository
class Provider(BaseProvider): class Provider(BaseProvider):
def set_package_python_versions(self, python_versions): def set_package_python_versions(self, python_versions: str) -> None:
self._package.python_versions = python_versions self._package.python_versions = python_versions
self._python_constraint = self._package.python_constraint self._python_constraint = self._package.python_constraint
@pytest.fixture @pytest.fixture
def repo(): def repo() -> Repository:
return Repository() return Repository("repo")
@pytest.fixture @pytest.fixture
def pool(repo): def pool(repo: TestRepository) -> Pool:
pool = Pool() pool = Pool()
pool.add_repository(repo) pool.add_repository(repo)
return pool return pool
@pytest.fixture @pytest.fixture
def root(): def root() -> ProjectPackage:
return ProjectPackage("myapp", "0.0.0") return ProjectPackage("myapp", "0.0.0")
@pytest.fixture @pytest.fixture
def provider(pool, root): def provider(pool: Pool, root: ProjectPackage) -> Provider:
return Provider(root, pool, NullIO()) return Provider(root, pool, NullIO())
 End of changes. 10 change blocks. 
8 lines changed or deleted 15 lines changed or added

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