tests/hghave.py
branchstable
changeset 1301 761641fc16a6
parent 1300 bf0c37b32582
child 1303 94e35118a756
--- a/tests/hghave.py	Sat Oct 05 01:02:22 2013 +0900
+++ b/tests/hghave.py	Sat Oct 05 01:02:22 2013 +0900
@@ -282,6 +282,9 @@
     from mercurial import util
     return util.safehasattr(__future__, "absolute_import")
 
+def has_py3k():
+    return 3 == sys.version_info[0]
+
 checks = {
     "true": (lambda: True, "yak shaving"),
     "false": (lambda: False, "nail clipper"),
@@ -324,4 +327,5 @@
     "msys": (has_msys, "Windows with MSYS"),
     "aix": (has_aix, "AIX"),
     "absimport": (has_absimport, "absolute_import in __future__"),
+    "py3k": (has_py3k, "running with Python 3.x"),
 }