From 056337e85473585a8557c62f98e5406dbefa51a5 Mon Sep 17 00:00:00 2001 From: Paul Arthur Date: Tue, 12 Nov 2024 16:35:40 +0000 Subject: [PATCH] tests: remove reliance on `python3` name * run key generation using current python interpreter * remove explicit fail when python3 is not found --- test/conftest.py | 2 ++ test/test_keygen.py | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/test/conftest.py b/test/conftest.py index 73e07cc..c05072d 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -3,6 +3,7 @@ import json import pathlib import subprocess +import sys import time import pytest @@ -18,6 +19,7 @@ def private_key(tmp_path_factory, tool_path): ['unsafe', 'example.com'], ]: binargs = [ + sys.executable, tool_path('contrib/openarc-keygen'), '-D', str(basepath), diff --git a/test/test_keygen.py b/test/test_keygen.py index 8dbc00e..df31632 100644 --- a/test/test_keygen.py +++ b/test/test_keygen.py @@ -35,7 +35,6 @@ def test_keygen(tool_path, tmp_path, python_version): try: subprocess.run(binargs, check=True) except FileNotFoundError: - assert python_version != 'python3' pytest.skip(f'{python_version} not found') keystat = tmp_path.joinpath('foo._domainkey.example.com.key').stat()