@@ -180,6 +180,8 @@ def test_example_repo_updates(tmp_path: Path):
180180 output = run (
181181 # Git directory expected to be different
182182 "diff -ur --exclude=.git "
183+ # uv lock expected to be different
184+ "--exclude=uv.lock "
183185 # The commit hash is different for some reason
184186 "--ignore-matching-lines='^_commit: ' "
185187 # If we tag an existing commit that has been pushed to main, then the copier
@@ -256,6 +258,27 @@ def test_pyright_works_in_standard_typing_mode(tmp_path: Path):
256258 run (f".venv/bin/pyright { tmp_path } " )
257259
258260
261+ def test_pyright_works_with_external_deps (tmp_path : Path ):
262+ copy_project (tmp_path )
263+ # Add an external dependency
264+ pyproject_toml = tmp_path / "pyproject.toml"
265+ text = pyproject_toml .read_text ().replace (
266+ "dependencies = []" , 'dependencies = ["numpy"]'
267+ )
268+ pyproject_toml .write_text (text )
269+ # And some code that uses it
270+ src_file = tmp_path / "src" / "python_copier_template_example" / "example.py"
271+ src_file .write_text ("""
272+ import numpy as np
273+
274+ def is_big(arr: np.ndarray) -> bool:
275+ return arr.size > 0
276+ """ )
277+ # Ensure pyright is still happy
278+ run = make_venv (tmp_path )
279+ run (".venv/bin/tox -e type-checking" )
280+
281+
259282def test_ignores_mypy_strict_mode (tmp_path : Path ):
260283 copy_project (tmp_path , type_checker = "mypy" , strict_typing = True )
261284 pyproject_toml = tmp_path / "pyproject.toml"
0 commit comments