Mercurial > public > mercurial-scm > hg-stable
diff tests/hghave.py @ 20114:390aff33c2f9
tests: fix `hghave root` on windows
This lets tests\test-hghave.t pass on windows where geteuid does not exist.
author | Simon Heimberg <simohe@besonet.ch> |
---|---|
date | Sat, 23 Nov 2013 01:06:20 +0100 |
parents | e54a078153f7 |
children | e457321a5687 |
line wrap: on
line diff
--- a/tests/hghave.py Wed Nov 20 12:55:08 2013 +0000 +++ b/tests/hghave.py Sat Nov 23 01:06:20 2013 +0100 @@ -234,7 +234,7 @@ os.rmdir(d) def has_root(): - return os.geteuid() == 0 + return getattr(os, 'geteuid', None) and os.geteuid() == 0 def has_pyflakes(): return matchoutput("sh -c \"echo 'import re' 2>&1 | pyflakes\"",