comparison tests/hghave.py @ 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 918dce4b8c26
children 6cff2ac0ccb9
comparison
equal deleted inserted replaced
29575:1cc5a918b7d8 29576:d5067913f97b
521 def has_absimport(): 521 def has_absimport():
522 import __future__ 522 import __future__
523 from mercurial import util 523 from mercurial import util
524 return util.safehasattr(__future__, "absolute_import") 524 return util.safehasattr(__future__, "absolute_import")
525 525
526 @check("py27+", "running with Python 2.7+")
527 def has_python27ornewer():
528 return sys.version_info[0:2] >= (2, 7)
529
526 @check("py3k", "running with Python 3.x") 530 @check("py3k", "running with Python 3.x")
527 def has_py3k(): 531 def has_py3k():
528 return 3 == sys.version_info[0] 532 return 3 == sys.version_info[0]
529 533
530 @check("py3exe", "a Python 3.x interpreter is available") 534 @check("py3exe", "a Python 3.x interpreter is available")