Mercurial > hg-stable
changeset 25039:8505eb1bafb1
run-tests: be more judicious about bytes vs string on test attrs
This introduces a bname attribute for when we need to use the test
name in a path, and retains name for when we need it as a
string. Sadly, we seem to need both of these.
author | Augie Fackler <augie@google.com> |
---|---|
date | Tue, 14 Apr 2015 15:59:59 -0400 |
parents | 66da89457c47 |
children | 6b8c48cfb85e |
files | tests/run-tests.py |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/run-tests.py Tue Apr 14 15:56:44 2015 -0400 +++ b/tests/run-tests.py Tue Apr 14 15:59:59 2015 -0400 @@ -431,20 +431,20 @@ shell is the shell to execute tests in. """ - - self.path = path.encode('utf-8') - self.name = os.path.basename(path) + self.path = path + self.bname = os.path.basename(path) + self.name = self.bname.decode('utf-8') self._testdir = os.path.dirname(path) - self.errpath = os.path.join(self._testdir, '%s.err' % self.name) + self.errpath = os.path.join(self._testdir, b'%s.err' % self.bname) - self._threadtmp = tmpdir.encode('utf-8') + self._threadtmp = tmpdir self._keeptmpdir = keeptmpdir self._debug = debug self._timeout = timeout self._startport = startport self._extraconfigopts = extraconfigopts or [] self._py3kwarnings = py3kwarnings - self._shell = shell + self._shell = shell.encode('utf-8') self._aborted = False self._daemonpids = []