tests/hghave.py
changeset 1302 f103c0693fbb
parent 1301 761641fc16a6
child 1303 94e35118a756
--- a/tests/hghave.py	Mon Oct 07 13:51:33 2013 +0100
+++ b/tests/hghave.py	Fri Nov 01 17:14:49 2013 +0000
@@ -277,6 +277,14 @@
 def has_aix():
     return sys.platform.startswith("aix")
 
+def has_absimport():
+    import __future__
+    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"),
@@ -318,4 +326,6 @@
     "windows": (has_windows, "Windows"),
     "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"),
 }