From 73d862d350750b2d9a5bde8798a43931265bb8d7 Mon Sep 17 00:00:00 2001 From: David C Ellis Date: Wed, 21 Oct 2026 17:36:40 +0100 Subject: [PATCH] Disable registry additions when installing UV pythons for extra tests. --- tests/conftest.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index 93c171d..22bb805 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -20,6 +20,7 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. +import os import os.path import sys import sysconfig @@ -32,6 +33,10 @@ from ducktools.pythonfinder import details_script from ducktools.pythonfinder.shared import DetailFinder +# Prevent UV from registering the python installs added during testing +# Prevent UV from discovering python installs that it shouldn't care about +os.environ["UV_PYTHON_NO_REGISTRY"] = "TRUE" +os.environ["UV_PYTHON_SEARCH_PATH"] = "/dev/null" @pytest.fixture(scope="session") def sources_folder():