tests/hghave.py
branchstable
changeset 1301 761641fc16a6
parent 1300 bf0c37b32582
child 1303 94e35118a756
equal deleted inserted replaced
1300:bf0c37b32582 1301:761641fc16a6
   279 
   279 
   280 def has_absimport():
   280 def has_absimport():
   281     import __future__
   281     import __future__
   282     from mercurial import util
   282     from mercurial import util
   283     return util.safehasattr(__future__, "absolute_import")
   283     return util.safehasattr(__future__, "absolute_import")
       
   284 
       
   285 def has_py3k():
       
   286     return 3 == sys.version_info[0]
   284 
   287 
   285 checks = {
   288 checks = {
   286     "true": (lambda: True, "yak shaving"),
   289     "true": (lambda: True, "yak shaving"),
   287     "false": (lambda: False, "nail clipper"),
   290     "false": (lambda: False, "nail clipper"),
   288     "baz": (has_baz, "GNU Arch baz client"),
   291     "baz": (has_baz, "GNU Arch baz client"),
   322     "unix-permissions": (has_unix_permissions, "unix-style permissions"),
   325     "unix-permissions": (has_unix_permissions, "unix-style permissions"),
   323     "windows": (has_windows, "Windows"),
   326     "windows": (has_windows, "Windows"),
   324     "msys": (has_msys, "Windows with MSYS"),
   327     "msys": (has_msys, "Windows with MSYS"),
   325     "aix": (has_aix, "AIX"),
   328     "aix": (has_aix, "AIX"),
   326     "absimport": (has_absimport, "absolute_import in __future__"),
   329     "absimport": (has_absimport, "absolute_import in __future__"),
       
   330     "py3k": (has_py3k, "running with Python 3.x"),
   327 }
   331 }