changeset 48880:431084a68c4a

tests: move Python 3.5 check higher in file Per code review comment on the changeset that introduced the Python 3.5+ checks. Differential Revision: https://phab.mercurial-scm.org/D12259
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 02 Mar 2022 08:29:52 -0700
parents 9987d14ad63f
children 82f1c46cce5c
files tests/run-tests.py
diffstat 1 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Sun Feb 20 15:35:09 2022 -0700
+++ b/tests/run-tests.py	Wed Mar 02 08:29:52 2022 -0700
@@ -72,6 +72,13 @@
 import uuid
 import xml.dom.minidom as minidom
 
+if sys.version_info < (3, 5, 0):
+    print(
+        '%s is only supported on Python 3.5+, not %s'
+        % (sys.argv[0], '.'.join(str(v) for v in sys.version_info[:3]))
+    )
+    sys.exit(70)  # EX_SOFTWARE from `man 3 sysexit`
+
 WINDOWS = os.name == r'nt'
 shellquote = shlex.quote
 
@@ -143,12 +150,6 @@
 
 origenviron = os.environ.copy()
 
-if sys.version_info < (3, 5, 0):
-    print(
-        '%s is only supported on Python 3.5+, not %s'
-        % (sys.argv[0], '.'.join(str(v) for v in sys.version_info[:3]))
-    )
-    sys.exit(70)  # EX_SOFTWARE from `man 3 sysexit`
 
 xrange = range  # we use xrange in one place, and we'd rather not use range