diff --git a/conda_lock/src_parser/pyproject_toml.py b/conda_lock/src_parser/pyproject_toml.py index 7bc1cfb73..fed6a62a6 100644 --- a/conda_lock/src_parser/pyproject_toml.py +++ b/conda_lock/src_parser/pyproject_toml.py @@ -516,7 +516,15 @@ def parse_python_requirement( ... ) # doctest: +NORMALIZE_WHITESPACE VCSDependency(name='conda-lock', manager='conda', category='main', extras=[], markers=None, source='https://github.com/conda/conda-lock.git', vcs='git', - rev='v2.4.1') + rev='v2.4.1', subdirectory=None) + + >>> parse_python_requirement( + ... "conda-lock @ git+https://github.com/conda/conda-lock.git@v2.4.1#subdirectory=src", + ... mapping_url=DEFAULT_MAPPING_URL, + ... ) # doctest: +NORMALIZE_WHITESPACE + VCSDependency(name='conda-lock', manager='conda', category='main', extras=[], + markers=None, source='https://github.com/conda/conda-lock.git', vcs='git', + rev='v2.4.1', subdirectory='src') >>> parse_python_requirement( ... "some-package @ https://some-repository.org/some-package-1.2.3.tar.gz", diff --git a/tests/test_conda_lock.py b/tests/test_conda_lock.py index 2b22e0c94..4c67ad521 100644 --- a/tests/test_conda_lock.py +++ b/tests/test_conda_lock.py @@ -825,7 +825,7 @@ def test_parse_poetry_path(poetry_pyproject_toml_path: Path): specs = {dep.name: dep for dep in res.dependencies["linux-64"]} assert isinstance(specs["fake-private-package"], PathDependency) - assert specs["fake-private-package"].path == "./fake-private-package-1.0.0" + assert specs["fake-private-package"].path == "fake-private-package-1.0.0" def test_parse_poetry_no_pypi(poetry_pyproject_toml_no_pypi: Path):