tests/hghave.py
branchstable
changeset 1099 55c85631631b
parent 1098 72f57519a427
child 1100 59a99457aa65
--- a/tests/hghave.py	Thu Jun 14 12:54:54 2012 +0200
+++ b/tests/hghave.py	Fri Jun 15 00:02:27 2012 +0200
@@ -50,7 +50,7 @@
 
 def has_eol_in_paths():
     try:
-        fd, path = tempfile.mkstemp(prefix=tempprefix, suffix='\n\r')
+        fd, path = tempfile.mkstemp(dir='.', prefix=tempprefix, suffix='\n\r')
         os.close(fd)
         os.remove(path)
         return True
@@ -60,7 +60,7 @@
 def has_executablebit():
     try:
         EXECFLAGS = stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH
-        fh, fn = tempfile.mkstemp(dir=".", prefix='hg-checkexec-')
+        fh, fn = tempfile.mkstemp(dir='.', prefix=tempprefix)
         try:
             os.close(fh)
             m = os.stat(fn).st_mode & 0777
@@ -76,7 +76,7 @@
 
 def has_icasefs():
     # Stolen from mercurial.util
-    fd, path = tempfile.mkstemp(prefix=tempprefix, dir='.')
+    fd, path = tempfile.mkstemp(dir='.', prefix=tempprefix)
     os.close(fd)
     try:
         s1 = os.stat(path)
@@ -105,7 +105,7 @@
 def has_cacheable_fs():
     from mercurial import util
 
-    fd, path = tempfile.mkstemp(prefix=tempprefix)
+    fd, path = tempfile.mkstemp(dir='.', prefix=tempprefix)
     os.close(fd)
     try:
         return util.cachestat(path).cacheable()
@@ -165,7 +165,7 @@
 def has_symlink():
     if getattr(os, "symlink", None) is None:
         return False
-    name = tempfile.mktemp(dir=".", prefix='hg-checklink-')
+    name = tempfile.mktemp(dir='.', prefix=tempprefix)
     try:
         os.symlink(".", name)
         os.unlink(name)
@@ -180,7 +180,7 @@
     return matchoutput('gpg --version 2>&1', r'GnuPG')
 
 def has_unix_permissions():
-    d = tempfile.mkdtemp(prefix=tempprefix, dir=".")
+    d = tempfile.mkdtemp(dir='.', prefix=tempprefix)
     try:
         fname = os.path.join(d, 'foo')
         for umask in (077, 007, 022):