11import os
22
3- from helpers import run_pipx_cli
4- from package_info import _exe_if_win
3+ from helpers import run_pipx_cli , WIN
54
65
76def test_custom_backend_venv (pipx_temp_env , capsys , caplog ):
@@ -14,14 +13,14 @@ def test_custom_backend_venv(pipx_temp_env, capsys, caplog):
1413def test_custom_backend_virtualenv (pipx_temp_env , capsys , caplog ):
1514 assert not run_pipx_cli (["install" , "--backend" , "virtualenv" , "nox" ])
1615 captured = capsys .readouterr ()
17- assert f" { _exe_if_win ( " virtualenv" ) } --python " in caplog .text
16+ assert " virtualenv" in caplog .text
1817 assert "installed package" in captured .out
1918
2019
2120def test_custom_backend_uv (pipx_temp_env , capsys , caplog ):
2221 assert not run_pipx_cli (["install" , "--backend" , "uv" , "pylint" ])
2322 captured = capsys .readouterr ()
24- assert f" { _exe_if_win ( "uv" ) } venv " in caplog .text
23+ assert "uv " in caplog .text
2524 assert "installed package" in captured .out
2625
2726
@@ -35,38 +34,38 @@ def test_custom_installer_pip(pipx_temp_env, capsys, caplog):
3534def test_custom_installer_uv (pipx_temp_env , capsys , caplog ):
3635 assert not run_pipx_cli (["install" , "--installer" , "uv" , "sphinx" ])
3736 captured = capsys .readouterr ()
38- assert f" { _exe_if_win ( "uv" ) } pip install " in caplog .text
37+ assert "uv " in caplog .text
3938 assert "installed package" in captured .out
4039
4140
4241def test_custom_installer_backend_uv (pipx_temp_env , capsys , caplog ):
4342 assert not run_pipx_cli (["install" , "--installer" , "uv" , "--backend" , "uv" , "black" ])
4443 captured = capsys .readouterr ()
45- assert f"{ _exe_if_win ( "uv" ) } venv" in caplog .text
46- assert f" { _exe_if_win ( "uv" ) } pip install" in caplog .text
44+ assert f"{ 'uv.EXE' if WIN else 'uv' } venv" in caplog .text
45+ assert "uv pip install" in caplog .text
4746 assert "installed package" in captured .out
4847
4948
5049def test_custom_installer_uv_backend_venv (pipx_temp_env , capsys , caplog ):
5150 assert not run_pipx_cli (["install" , "--installer" , "uv" , "--backend" , "venv" , "nox" ])
5251 captured = capsys .readouterr ()
5352 assert "-m venv --without-pip" in caplog .text
54- assert f"{ _exe_if_win ( "uv" ) } pip install" in caplog .text
53+ assert f"{ 'uv.EXE' if WIN else 'uv' } pip install" in caplog .text
5554 assert "installed package" in captured .out
5655
5756
5857def test_custom_installer_uv_backend_virtualenv (pipx_temp_env , capsys , caplog ):
5958 assert not run_pipx_cli (["install" , "--installer" , "uv" , "--backend" , "virtualenv" , "pylint" ])
6059 captured = capsys .readouterr ()
61- assert f" { _exe_if_win ( " virtualenv" ) } --python " in caplog .text
62- assert f"{ _exe_if_win ( "uv" ) } pip install" in caplog .text
60+ assert " virtualenv" in caplog .text
61+ assert f"{ 'uv.EXE' if WIN else 'uv' } pip install" in caplog .text
6362 assert "installed package" in captured .out
6463
6564
6665def test_custom_installer_pip_backend_uv (pipx_temp_env , capsys , caplog ):
6766 assert not run_pipx_cli (["install" , "--installer" , "pip" , "--backend" , "uv" , "nox" ])
6867 captured = capsys .readouterr ()
69- assert f"{ _exe_if_win ( "uv" ) } venv" in caplog .text
68+ assert f"{ 'uv.EXE' if WIN else 'uv' } venv" in caplog .text
7069 assert "-m pip" in caplog .text
7170 assert "installed package" in captured .out
7271
0 commit comments