git.samba.org
/
jelmer
/
subvertpy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
266c0d7
)
Create temp file with correct filename under Windows OS.
author
Yonggang Luo
<luoyonggang@gmail.com>
Sun, 11 Mar 2012 15:27:06 +0000
(23:27 +0800)
committer
Yonggang Luo
<luoyonggang@gmail.com>
Sun, 11 Mar 2012 15:27:06 +0000
(23:27 +0800)
subvertpy/tests/__init__.py
patch
|
blob
|
history
diff --git
a/subvertpy/tests/__init__.py
b/subvertpy/tests/__init__.py
index b7e3fd32d5b7955dd34ee3969def9188dc2ac554..b8151f41df607530070220d6cf0ee5110144940c 100644
(file)
--- a/
subvertpy/tests/__init__.py
+++ b/
subvertpy/tests/__init__.py
@@
-88,7
+88,11
@@
class TestCaseInTempDir(TestCase):
def setUp(self):
TestCase.setUp(self)
self._oldcwd = os.getcwd()
- self.test_dir = tempfile.mkdtemp()
+ if os.name == 'nt':
+ self.test_dir = tempfile.mkdtemp(dir =
+ os.getenv("TEMP", None) or os.getenv("TMP", None))
+ else:
+ self.test_dir = tempfile.mkdtemp()
os.chdir(self.test_dir)
def tearDown(self):