aboutsummaryrefslogtreecommitdiff
path: root/test/lint/check-doc.py
diff options
context:
space:
mode:
authorSjors Provoost <sjors@sprovoost.nl>2018-12-06 15:38:57 +0100
committerSjors Provoost <sjors@sprovoost.nl>2018-12-12 10:39:32 +0100
commit74ce32683199b987e45eb16f0320ae392ff10edc (patch)
tree563736b248986a5cf50e867fea24495e32159f69 /test/lint/check-doc.py
parented2a2cebd36280be0b5e585a8c3c901c15e52f87 (diff)
downloadbitcoin-74ce32683199b987e45eb16f0320ae392ff10edc.tar.xz
[test] Travis: enforce Python 3.4 support in functional tests
Make lint/check-doc.py Python 3.4 compatible. Also add .python-version for pyenv which will cause tests with too modern syntax to fail on developer machine rather than on Travis.
Diffstat (limited to 'test/lint/check-doc.py')
-rwxr-xr-xtest/lint/check-doc.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/lint/check-doc.py b/test/lint/check-doc.py
index b0d9f87958..4facd6c334 100755
--- a/test/lint/check-doc.py
+++ b/test/lint/check-doc.py
@@ -26,8 +26,12 @@ SET_DOC_OPTIONAL = set(['-h', '-help', '-dbcrashratio', '-forcecompactdb'])
def main():
- used = check_output(CMD_GREP_ARGS, shell=True, universal_newlines=True, encoding='utf8')
- docd = check_output(CMD_GREP_DOCS, shell=True, universal_newlines=True, encoding='utf8')
+ if sys.version_info >= (3, 6):
+ used = check_output(CMD_GREP_ARGS, shell=True, universal_newlines=True, encoding='utf8')
+ docd = check_output(CMD_GREP_DOCS, shell=True, universal_newlines=True, encoding='utf8')
+ else:
+ used = check_output(CMD_GREP_ARGS, shell=True, universal_newlines=True) # encoding='utf8'
+ docd = check_output(CMD_GREP_DOCS, shell=True, universal_newlines=True) # encoding='utf8'
args_used = set(re.findall(re.compile(REGEX_ARG), used))
args_docd = set(re.findall(re.compile(REGEX_DOC), docd)).union(SET_DOC_OPTIONAL)