comparison tests/run-tests.py @ 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 6000f5b25c9b
children 642e31cb55f0
comparison
equal deleted inserted replaced
48879:9987d14ad63f 48880:431084a68c4a
70 import time 70 import time
71 import unittest 71 import unittest
72 import uuid 72 import uuid
73 import xml.dom.minidom as minidom 73 import xml.dom.minidom as minidom
74 74
75 if sys.version_info < (3, 5, 0):
76 print(
77 '%s is only supported on Python 3.5+, not %s'
78 % (sys.argv[0], '.'.join(str(v) for v in sys.version_info[:3]))
79 )
80 sys.exit(70) # EX_SOFTWARE from `man 3 sysexit`
81
75 WINDOWS = os.name == r'nt' 82 WINDOWS = os.name == r'nt'
76 shellquote = shlex.quote 83 shellquote = shlex.quote
77 84
78 85
79 processlock = threading.Lock() 86 processlock = threading.Lock()
141 runnerformatter = formatters.Terminal256Formatter(style=TestRunnerStyle) 148 runnerformatter = formatters.Terminal256Formatter(style=TestRunnerStyle)
142 runnerlexer = TestRunnerLexer() 149 runnerlexer = TestRunnerLexer()
143 150
144 origenviron = os.environ.copy() 151 origenviron = os.environ.copy()
145 152
146 if sys.version_info < (3, 5, 0):
147 print(
148 '%s is only supported on Python 3.5+, not %s'
149 % (sys.argv[0], '.'.join(str(v) for v in sys.version_info[:3]))
150 )
151 sys.exit(70) # EX_SOFTWARE from `man 3 sysexit`
152 153
153 xrange = range # we use xrange in one place, and we'd rather not use range 154 xrange = range # we use xrange in one place, and we'd rather not use range
154 155
155 156
156 def _sys2bytes(p): 157 def _sys2bytes(p):