# HG changeset patch # User Gregory Szorc # Date 2016-07-17 17:50:51 # Node ID d5067913f97b1c58a2952779434dc2bc373e0a0d # Parent 1cc5a918b7d8acdc918809d74842fecc128c4ec4 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. diff --git a/tests/hghave.py b/tests/hghave.py --- a/tests/hghave.py +++ b/tests/hghave.py @@ -523,6 +523,10 @@ def has_absimport(): 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]