mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
run-tests: python3.5 now supports mkdtemp using bytes for paths
Now that http://bugs.python.org/issue24230 is fixed (thanks to Gregory Smith for that quick response!) we can drop one more ugly hack around path handling. Tests still pass in 3.5 with this cleaner version, as well as in 2.6.
This commit is contained in:
parent
ab57fc9f4c
commit
10487ffdd9
@ -1747,9 +1747,7 @@ class TestRunner(object):
|
||||
# without this, we get the default temp dir location, but
|
||||
# in all lowercase, which causes troubles with paths (issue3490)
|
||||
d = osenvironb.get(b'TMP', None)
|
||||
# FILE BUG: mkdtemp works only on unicode in Python 3
|
||||
tmpdir = tempfile.mkdtemp('', 'hgtests.', d and _strpath(d))
|
||||
tmpdir = _bytespath(tmpdir)
|
||||
tmpdir = tempfile.mkdtemp(b'', b'hgtests.', d)
|
||||
|
||||
self._hgtmp = osenvironb[b'HGTMP'] = (
|
||||
os.path.realpath(tmpdir))
|
||||
|
Loading…
Reference in New Issue
Block a user