summaryrefslogtreecommitdiff
path: root/Lib/test
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-06-12 02:52:16 +0200
committerGitHub <noreply@github.com>2019-06-12 02:52:16 +0200
commitefdf6ca90f7702824e7aeee1ceca949e7c20288a (patch)
treea2c5c8e15727ea81da25c850522de4e201f36829 /Lib/test
parent10b55c1643b512b3a2cae8ab89c53683a13ca43e (diff)
downloadcpython-git-efdf6ca90f7702824e7aeee1ceca949e7c20288a.tar.gz
bpo-35766: compile(): rename feature_version parameter (GH-13994)
Rename compile() feature_version parameter to _feature_version and convert it to a keyword-only parameter. Update also test_type_comments to pass feature_version as a tuple.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_type_comments.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_type_comments.py b/Lib/test/test_type_comments.py
index 55b54e7f20..43be54efdb 100644
--- a/Lib/test/test_type_comments.py
+++ b/Lib/test/test_type_comments.py
@@ -228,8 +228,9 @@ class TypeCommentTests(unittest.TestCase):
feature_version=feature_version)
def parse_all(self, source, minver=lowest, maxver=highest, expected_regex=""):
- for feature_version in range(self.lowest, self.highest + 1):
- if minver <= feature_version <= maxver:
+ for version in range(self.lowest, self.highest + 1):
+ feature_version = (3, version)
+ if minver <= version <= maxver:
try:
yield self.parse(source, feature_version)
except SyntaxError as err: