tests/hghave.py
changeset 29820 7025693433b2
parent 29801 94fb0458a791
child 29854 00ca4f966ca6
equal deleted inserted replaced
29819:8d226db31f20 29820:7025693433b2
   542 
   542 
   543 @check("py3exe", "a Python 3.x interpreter is available")
   543 @check("py3exe", "a Python 3.x interpreter is available")
   544 def has_python3exe():
   544 def has_python3exe():
   545     return 'PYTHON3' in os.environ
   545     return 'PYTHON3' in os.environ
   546 
   546 
       
   547 @check("py3pygments", "Pygments available on Python 3.x")
       
   548 def has_py3pygments():
       
   549     if has_py3k():
       
   550         return has_pygments()
       
   551     elif has_python3exe():
       
   552         # just check exit status (ignoring output)
       
   553         py3 = os.environ['PYTHON3']
       
   554         return matchoutput('%s -c "import pygments"' % py3, br'')
       
   555     return False
       
   556 
   547 @check("pure", "running with pure Python code")
   557 @check("pure", "running with pure Python code")
   548 def has_pure():
   558 def has_pure():
   549     return any([
   559     return any([
   550         os.environ.get("HGMODULEPOLICY") == "py",
   560         os.environ.get("HGMODULEPOLICY") == "py",
   551         os.environ.get("HGTEST_RUN_TESTS_PURE") == "--pure",
   561         os.environ.get("HGTEST_RUN_TESTS_PURE") == "--pure",