Skip to content

Commit

Permalink
test(functional): add test for transitive dependency with different m…
Browse files Browse the repository at this point in the history
…odule name
  • Loading branch information
mkniewallner committed Sep 15, 2024
1 parent 0640431 commit 9868d4d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/data/pep_621_project/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions tests/data/pep_621_project/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
import white as w
from urllib3 import contrib
import asyncio
import bs4
5 changes: 5 additions & 0 deletions tests/functional/cli/test_cli_pep_621.py
Original file line number Diff line number Diff line change
Expand Up @@ -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},
},
]

0 comments on commit 9868d4d

Please sign in to comment.