tests/hghave
changeset 6355 3b841c189ab7
parent 6079 ea34059b89de
child 6372 8f79820443a4
equal deleted inserted replaced
6354:57a47660b319 6355:3b841c189ab7
   105                 return False
   105                 return False
   106         return True
   106         return True
   107     finally:
   107     finally:
   108         os.rmdir(d)
   108         os.rmdir(d)
   109 
   109 
       
   110 def has_pygments():
       
   111     try:
       
   112         import pygments
       
   113         return True
       
   114     except ImportError:
       
   115         return False
       
   116 
   110 checks = {
   117 checks = {
   111     "baz": (has_baz, "GNU Arch baz client"),
   118     "baz": (has_baz, "GNU Arch baz client"),
   112     "cvs": (has_cvs, "cvs client"),
   119     "cvs": (has_cvs, "cvs client"),
   113     "cvsps": (has_cvsps, "cvsps utility"),
   120     "cvsps": (has_cvsps, "cvsps utility"),
   114     "darcs": (has_darcs, "darcs client"),
   121     "darcs": (has_darcs, "darcs client"),
   121     "svn": (has_svn, "subversion client and admin tools"),
   128     "svn": (has_svn, "subversion client and admin tools"),
   122     "svn-bindings": (has_svn_bindings, "subversion python bindings"),
   129     "svn-bindings": (has_svn_bindings, "subversion python bindings"),
   123     "symlink": (has_symlink, "symbolic links"),
   130     "symlink": (has_symlink, "symbolic links"),
   124     "tla": (has_tla, "GNU Arch tla client"),
   131     "tla": (has_tla, "GNU Arch tla client"),
   125     "unix-permissions": (has_unix_permissions, "unix-style permissions"),
   132     "unix-permissions": (has_unix_permissions, "unix-style permissions"),
       
   133     "pygments": (has_pygments, "Pygments source highlighting library"),
   126 }
   134 }
   127 
   135 
   128 def list_features():
   136 def list_features():
   129     for name, feature in checks.iteritems():
   137     for name, feature in checks.iteritems():
   130         desc = feature[1]
   138         desc = feature[1]