From ae59b91ad31af0b676f96f55e8d63bbd9bc719d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 4 Jul 2023 15:09:10 +0200 Subject: [PATCH] Ensure the current Python version is in tests.versions --- tests/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/__init__.py b/tests/__init__.py index c9a52ca..4f7d161 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,6 +1,7 @@ import os import shutil import subprocess +import sys import tempfile from unittest import TestCase @@ -9,6 +10,8 @@ venv_path = os.path.realpath(os.path.join(tmplocation,'srs_venv')) clone_path = os.path.realpath(os.path.join(tmplocation,'clone_venv')) versions = ['2.7', '3.4', '3.5', '3.6', '3.7', '3.8', '3.9', '3.10'] +if '{}.{}'.format(*sys.version_info) not in versions: + versions.append('{}.{}'.format(*sys.version_info)) def clean(): if os.path.exists(tmplocation): shutil.rmtree(tmplocation)