~ubuntu-branches/ubuntu/wily/mercurial/wily

« back to all changes in this revision

Viewing changes to tests/hghave.py

  • Committer: Package Import Robot
  • Author(s): Javi Merino
  • Date: 2013-11-01 23:19:57 UTC
  • mfrom: (1.2.38) (9.1.16 experimental)
  • Revision ID: package-import@ubuntu.com-20131101231957-hs70pwpinavlz3t6
Tags: 2.8-1
* New upstream release
* Fix mercurial-git and hgsubversion autopkgtest by loading the
  appropriate extension
* Bump standards-version to 3.9.5 (no change needed)

Show diffs side-by-side

added added

removed removed

Lines of Context:
277
277
def has_aix():
278
278
    return sys.platform.startswith("aix")
279
279
 
 
280
def has_absimport():
 
281
    import __future__
 
282
    from mercurial import util
 
283
    return util.safehasattr(__future__, "absolute_import")
 
284
 
 
285
def has_py3k():
 
286
    return 3 == sys.version_info[0]
 
287
 
280
288
checks = {
281
289
    "true": (lambda: True, "yak shaving"),
282
290
    "false": (lambda: False, "nail clipper"),
318
326
    "windows": (has_windows, "Windows"),
319
327
    "msys": (has_msys, "Windows with MSYS"),
320
328
    "aix": (has_aix, "AIX"),
 
329
    "absimport": (has_absimport, "absolute_import in __future__"),
 
330
    "py3k": (has_py3k, "running with Python 3.x"),
321
331
}