@@ -33,28 +33,27 @@ function curl-harder() {
3333# ###############################################################
3434
3535echo " ::group::Versions"
36- python -c " import sys, struct, ssl; print('python:', sys.version); print('version_info:', sys.version_info); print('bits:', struct.calcsize('P') * 8); print('openssl:', ssl.OPENSSL_VERSION, ssl.OPENSSL_VERSION_INFO)"
36+ uv run python -c " import sys, struct, ssl; print('python:', sys.version); print('version_info:', sys.version_info); print('bits:', struct.calcsize('P') * 8); print('openssl:', ssl.OPENSSL_VERSION, ssl.OPENSSL_VERSION_INFO)"
3737echo " ::endgroup::"
3838
3939echo " ::group::Install dependencies"
40- python -m pip install -U pip uv -c test-requirements.txt
41- python -m pip --version
42- python -m uv --version
40+ uv pip install -U uv -c test-requirements.txt
41+ uv --version
4342
44- python -m uv pip install build
43+ uv pip install build
4544
46- python -m build
45+ uv run -m build
4746wheel_package=$( ls dist/* .whl)
48- python -m uv pip install " trio @ $wheel_package " -c test-requirements.txt
47+ uv pip install " trio @ $wheel_package " -c test-requirements.txt
4948
5049# Actual tests
5150# expands to 0 != 1 if NO_TEST_REQUIREMENTS is not set, if set the `-0` has no effect
5251# https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02
5352if [ " ${NO_TEST_REQUIREMENTS-0} " == 1 ]; then
54- python -m uv pip install pytest coverage -c test-requirements.txt
53+ uv pip install pytest coverage -c test-requirements.txt
5554 flags=" --skip-optional-imports"
5655else
57- python -m uv pip install -r test-requirements.txt --no-deps
56+ uv pip install -r test-requirements.txt --no-deps
5857 flags=" "
5958fi
6059
@@ -111,7 +110,7 @@ echo "::group::Setup for tests"
111110mkdir empty || true
112111cd empty
113112
114- INSTALLDIR=$( python -c " import os, trio; print(os.path.dirname(trio.__file__))" )
113+ INSTALLDIR=$( uv run python -c " import os, trio; print(os.path.dirname(trio.__file__))" )
115114cp ../pyproject.toml " $INSTALLDIR " # TODO: remove this
116115
117116# get mypy tests a nice cache
@@ -125,7 +124,7 @@ perl -i -pe 's/-p trio\._tests\.pytest_plugin//' "$INSTALLDIR/pyproject.toml"
125124echo " ::endgroup::"
126125echo " ::group:: Run Tests"
127126if PYTHONPATH=../tests COVERAGE_PROCESS_START=$( pwd) /../pyproject.toml \
128- coverage run --rcfile=../pyproject.toml -m \
127+ uv run coverage run --rcfile=../pyproject.toml -m \
129128 pytest -ra --junitxml=../test-results.xml \
130129 -p _trio_check_attrs_aliases --verbose --durations=10 \
131130 -p trio._tests.pytest_plugin --run-slow $flags " ${INSTALLDIR} " ; then
136135echo " ::endgroup::"
137136echo " ::group::Coverage"
138137
139- coverage combine --rcfile ../pyproject.toml
138+ uv run coverage combine --rcfile ../pyproject.toml
140139cd .. # coverage needs to be in the folder containing src/trio
141140cp empty/.coverage .
142- coverage report -m --rcfile ./pyproject.toml
143- coverage xml --rcfile ./pyproject.toml
141+ uv run coverage report -m --rcfile ./pyproject.toml
142+ uv run coverage xml --rcfile ./pyproject.toml
144143
145144# Remove the LSP again; again we want to do this ASAP to avoid
146145# accidentally breaking other stuff.
0 commit comments