Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bdb1c16

Browse files
committed
Don't test library against unsupported Python versions.
Previously the tests would still be run against Python 2.7 if they found it installed on your machine. Now they will run on Python versions 3.5 to 3.10 and currently unreleased versions up to and including 3.19.
1 parent b912db0 commit bdb1c16

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/testall.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ def _python_ver_from_python(python):
2626

2727
def _gen_python_names():
2828
yield "python"
29-
for ver in [(2,6), (2,7), (3,3), (3,4), (3,5), (3,6), (3,7)]:
29+
# generate version numbers from python 3.5 to 3.20
30+
for ver in [(3, i) for i in range(5, 20)]:
3031
yield "python%d.%d" % ver
3132
if sys.platform == "win32":
3233
yield "python%d%d" % ver
@@ -43,8 +44,8 @@ def _gen_pythons():
4344

4445
def testall():
4546
for ver, python in _gen_pythons():
46-
if ver < (2,6) or ver in ((3,0), (3,1), (3,2)):
47-
# Don't support Python < 2.6, 3.0/3.1/3.2.
47+
if ver < (3, 5):
48+
# Don't support Python < 3.5
4849
continue
4950
ver_str = "%s.%s" % ver
5051
print("-- test with Python %s (%s)" % (ver_str, python))

0 commit comments

Comments
 (0)