aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-12-13 13:12:41 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2018-12-13 13:17:19 +0100
commit84dc252a02c322b9f74aba094457f7588c592fe7 (patch)
tree2bb0d23f62e50674b085d78de9214f66033a092a /test/functional
parentf17aca67b07f15c10dcd0ece4ed7b0ebfa963c85 (diff)
parent31926ee8cfc73501524dfa0fef2ccbaa786d6a00 (diff)
Merge #14884: Travis: enforce Python 3.4 support through linter
31926ee8cfc73501524dfa0fef2ccbaa786d6a00 [test] functional framework: add CScript hex() for Python 3.4 (Sjors Provoost) 74ce32683199b987e45eb16f0320ae392ff10edc [test] Travis: enforce Python 3.4 support in functional tests (Sjors Provoost) Pull request description: The minimum supported version of Python is 3.4 according to [dependencies.md](https://github.com/bitcoin/bitcoin/blob/master/doc/dependencies.md). This PR makes the Travis linter use this version in order to catch accidental use of modern syntax. Tree-SHA512: 71b2c102be72b135a8ba049378d66875760f20a04a657102a399240c5c2b2ddbdfa7d5ab4c0c0242ecc3259e0ee8eb2273f331bc5eb824f4ae4c3cc58aea37ac
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/test_framework/script.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/functional/test_framework/script.py b/test/functional/test_framework/script.py
index 2c5ba24a6a..012c80a1be 100644
--- a/test/functional/test_framework/script.py
+++ b/test/functional/test_framework/script.py
@@ -450,6 +450,10 @@ class CScript(bytes):
# join makes no sense for a CScript()
raise NotImplementedError
+ # Python 3.4 compatibility
+ def hex(self):
+ return hexlify(self).decode('ascii')
+
def __new__(cls, value=b''):
if isinstance(value, bytes) or isinstance(value, bytearray):
return super(CScript, cls).__new__(cls, value)