Mercurial > hg
comparison tests/run-tests.py @ 25262:5a809deb88e6
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.
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Fri, 22 May 2015 21:19:08 -0400 |
parents | 27600986a0d9 |
children | 8f88f768e24c |
comparison
equal
deleted
inserted
replaced
25261:27600986a0d9 | 25262:5a809deb88e6 |
---|---|
1745 d = None | 1745 d = None |
1746 if os.name == 'nt': | 1746 if os.name == 'nt': |
1747 # without this, we get the default temp dir location, but | 1747 # without this, we get the default temp dir location, but |
1748 # in all lowercase, which causes troubles with paths (issue3490) | 1748 # in all lowercase, which causes troubles with paths (issue3490) |
1749 d = osenvironb.get(b'TMP', None) | 1749 d = osenvironb.get(b'TMP', None) |
1750 # FILE BUG: mkdtemp works only on unicode in Python 3 | 1750 tmpdir = tempfile.mkdtemp(b'', b'hgtests.', d) |
1751 tmpdir = tempfile.mkdtemp('', 'hgtests.', d and _strpath(d)) | |
1752 tmpdir = _bytespath(tmpdir) | |
1753 | 1751 |
1754 self._hgtmp = osenvironb[b'HGTMP'] = ( | 1752 self._hgtmp = osenvironb[b'HGTMP'] = ( |
1755 os.path.realpath(tmpdir)) | 1753 os.path.realpath(tmpdir)) |
1756 | 1754 |
1757 if self.options.with_hg: | 1755 if self.options.with_hg: |