From 15791a23c95d054b1de08c90401b21b8cdda0c81 Mon Sep 17 00:00:00 2001 From: CRIMINAL Date: Sun, 8 Nov 2020 11:41:55 +0000 Subject: [PATCH] Check if user is using Python 3.9 --- tests/main_test.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/main_test.py b/tests/main_test.py index 2b32c6b27..19edb1681 100644 --- a/tests/main_test.py +++ b/tests/main_test.py @@ -5,9 +5,11 @@ def version_check(): - if sys.version_info.major < 3: - string = "The script may not work with Python version 3.7 and below \n" - string += "Execute the script with Python 3.8 \n" + version_info = sys.version_info + python_version = f"{version_info.major}.{version_info.minor}" + python_version = float(python_version) + if python_version < 3.9: + string = "Execute the script with Python 3.9 \n" string += "Press enter to continue" input(string)