@@ -37,10 +37,12 @@ def run_pipe(cmd: str, cwd=None):
3737
3838
3939def make_venv (project_path : Path ) -> callable :
40- venv_path = project_path / "venv"
41- run_pipe (f"python -m venv { venv_path } " )
40+ venv_path = project_path / ". venv"
41+ run_pipe (f"uv venv { venv_path } " )
4242 run = functools .partial (run_pipe , cwd = str (project_path ))
43- run ("./venv/bin/pip install -e .[dev]" )
43+ # install to this env (hence the -p)
44+ run (f"uv pip install -e .[dev] -p { venv_path } /bin/python" )
45+ # run("ls -la .venv/bin >&2")
4446 return run
4547
4648
@@ -53,14 +55,14 @@ def test_template_defaults(tmp_path: Path):
5355 catalog_info = tmp_path / "catalog-info.yaml"
5456 assert catalog_info .exists ()
5557 assert 'typeCheckingMode = "strict"' in pyproject_toml .read_text ()
56- run ("./ venv/bin/tox -p" )
58+ run (".venv/bin/tox -p" )
5759 if not run_pipe ("git tag --points-at HEAD" ):
5860 # Only run linkcheck if not on a tag, as the CI might not have pushed
5961 # the docs for this tag yet, so we will fail
60- run ("./ venv/bin/tox -e docs build -- -b linkcheck" )
61- run ("./ venv/bin/pip install build twine" )
62- run ("./ venv/bin/python -m build" )
63- run ("./ venv/bin/twine check --strict dist/*" )
62+ run (".venv/bin/tox -p - e docs -- -b linkcheck" )
63+ run (".venv/bin/uv pip install build twine" )
64+ run (".venv/bin/python -m build" )
65+ run (".venv/bin/twine check --strict dist/*" )
6466
6567
6668def test_template_with_extra_code_and_api_docs (tmp_path : Path ):
@@ -100,7 +102,7 @@ class Thing:
100102 # Add to make sure pre-commit doesn't moan
101103 run ("git add ." )
102104 # Build
103- run ("./ venv/bin/tox -p" )
105+ run (".venv/bin/tox -p" )
104106 # Check it generates the right output
105107 api_dir = tmp_path / "build" / "html" / "_api"
106108 top_html = api_dir / "python_copier_template_example.html"
@@ -121,13 +123,13 @@ class Thing:
121123def test_template_mypy (tmp_path : Path ):
122124 copy_project (tmp_path , type_checker = "mypy" )
123125 run = make_venv (tmp_path )
124- run ("./ venv/bin/tox -p" )
126+ run (".venv/bin/tox -p" )
125127
126128
127129def test_template_no_docs (tmp_path : Path ):
128130 copy_project (tmp_path , docs_type = "README" )
129131 run = make_venv (tmp_path )
130- run ("./ venv/bin/tox -p" )
132+ run (".venv/bin/tox -p" )
131133
132134
133135def test_template_in_different_org_has_no_catalog (tmp_path : Path ):
@@ -141,7 +143,7 @@ def test_template_no_docker_has_no_docs_and_works(tmp_path: Path):
141143 container_doc = tmp_path / "docs" / "how-to" / "run-container.md"
142144 assert not container_doc .exists ()
143145 run = make_venv (tmp_path )
144- run ("./ venv/bin/tox -p" )
146+ run (".venv/bin/tox -p" )
145147
146148
147149def test_bad_repo_name (tmp_path : Path ):
@@ -232,7 +234,7 @@ def test_pyright_works_in_standard_typing_mode(tmp_path: Path):
232234
233235 # Ensure pyright is still happy
234236 run = make_venv (tmp_path )
235- run (f"./ venv/bin/pyright { tmp_path } " )
237+ run (f".venv/bin/pyright { tmp_path } " )
236238
237239
238240def test_ignores_mypy_strict_mode (tmp_path : Path ):
0 commit comments