From 9868d4d0d4bccbc75b115be4407565673062c51e Mon Sep 17 00:00:00 2001 From: Mathieu Kniewallner Date: Sun, 15 Sep 2024 12:14:15 +0200 Subject: [PATCH] test(functional): add test for transitive dependency with different module name --- tests/data/pep_621_project/pyproject.toml | 1 + tests/data/pep_621_project/src/main.py | 1 + tests/functional/cli/test_cli_pep_621.py | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/tests/data/pep_621_project/pyproject.toml b/tests/data/pep_621_project/pyproject.toml index 8de3e58d..285d1a8d 100644 --- a/tests/data/pep_621_project/pyproject.toml +++ b/tests/data/pep_621_project/pyproject.toml @@ -8,6 +8,7 @@ dependencies = [ "toml", "urllib3>=1.26.12", "isort>=5.10.1", + "itchiodl==2.3.0", "click>=8.1.3", "requests>=2.28.1", "pkginfo>=1.8.3", diff --git a/tests/data/pep_621_project/src/main.py b/tests/data/pep_621_project/src/main.py index b222b647..16b6c177 100644 --- a/tests/data/pep_621_project/src/main.py +++ b/tests/data/pep_621_project/src/main.py @@ -6,3 +6,4 @@ import white as w from urllib3 import contrib import asyncio +import bs4 diff --git a/tests/functional/cli/test_cli_pep_621.py b/tests/functional/cli/test_cli_pep_621.py index e0a2a3c2..0788fa14 100644 --- a/tests/functional/cli/test_cli_pep_621.py +++ b/tests/functional/cli/test_cli_pep_621.py @@ -68,4 +68,9 @@ def test_cli_with_pep_621(pip_venv_factory: PipVenvFactory) -> None: "module": "white", "location": {"file": str(Path("src/main.py")), "line": 6, "column": 8}, }, + { + "error": {"code": "DEP003", "message": "'bs4' imported but it is a transitive dependency"}, + "module": "bs4", + "location": {"file": str(Path("src/main.py")), "line": 7, "column": 8}, + }, ]