@@ -183,24 +183,23 @@ def test_list_tags() -> None:
183183 assert isinstance (item , str )
184184
185185
186- def test_ro_venv () -> None :
186+ def test_ro_venv (tmp_path : Path ) -> None :
187187 """Tests behavior when the virtual environment is read-only."""
188188 tox_work_dir = os .environ .get ("TOX_WORK_DIR" , ".tox" )
189189 venv_path = f"{ tox_work_dir } /ro"
190- prerelease_flag = "" if sys .version_info < (3 , 14 ) else "--pre "
191190 commands = [
192191 f"mkdir -p { venv_path } " ,
193192 f"chmod -R a+w { venv_path } " ,
194193 f"rm -rf { venv_path } " ,
195- f"python -m venv --symlinks { venv_path } " ,
196- f"{ venv_path } /bin/python -m pip install { prerelease_flag } -q -e ." ,
194+ f"uv venv --seed --no-project { venv_path } " ,
195+ f"VIRTUAL_ENV= { venv_path } uv pip install -q -e ." ,
197196 f"chmod -R a-w { venv_path } " ,
198197 # running with a ro venv and default cwd
199198 f"{ venv_path } /bin/ansible-lint --version" ,
200199 # running from a read-only cwd:
201200 f"cd / && { abspath (venv_path )} /bin/ansible-lint --version" , # noqa: PTH100
202201 # running with a ro venv and a custom project path in forced non-online mode, so it will need to install requirements
203- f"{ venv_path } /bin/ansible-lint -vv --no-offline --project-dir ./examples/reqs_v2/ ./examples/reqs_v2/" ,
202+ f"{ venv_path } /bin/ansible-lint -vv --nocolor -- no-offline --project-dir { tmp_path . as_posix () } ./examples/reqs_v2/" ,
204203 ]
205204 for cmd in commands :
206205 result = subprocess .run (
0 commit comments