tests/hghave.py
changeset 20114 390aff33c2f9
parent 20008 e54a078153f7
child 20304 e457321a5687
equal deleted inserted replaced
20113:7ad2ae7792ad 20114:390aff33c2f9
   232         return True
   232         return True
   233     finally:
   233     finally:
   234         os.rmdir(d)
   234         os.rmdir(d)
   235 
   235 
   236 def has_root():
   236 def has_root():
   237     return os.geteuid() == 0
   237     return getattr(os, 'geteuid', None) and os.geteuid() == 0
   238 
   238 
   239 def has_pyflakes():
   239 def has_pyflakes():
   240     return matchoutput("sh -c \"echo 'import re' 2>&1 | pyflakes\"",
   240     return matchoutput("sh -c \"echo 'import re' 2>&1 | pyflakes\"",
   241                        r"<stdin>:1: 're' imported but unused",
   241                        r"<stdin>:1: 're' imported but unused",
   242                        True)
   242                        True)