changeset 29576:d5067913f97b

hghave: add test for Python 2.7+ Setting ciphers in the ssl module requires Python 2.7. Surprisingly, we didn't have a test for running on Python 2.7.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 17 Jul 2016 10:50:51 -0700
parents 1cc5a918b7d8
children 9654ef41f7cc
files tests/hghave.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/hghave.py	Sat Jul 16 15:06:19 2016 +0800
+++ b/tests/hghave.py	Sun Jul 17 10:50:51 2016 -0700
@@ -523,6 +523,10 @@
     from mercurial import util
     return util.safehasattr(__future__, "absolute_import")
 
+@check("py27+", "running with Python 2.7+")
+def has_python27ornewer():
+    return sys.version_info[0:2] >= (2, 7)
+
 @check("py3k", "running with Python 3.x")
 def has_py3k():
     return 3 == sys.version_info[0]