# HG changeset patch # User Augie Fackler # Date 1533590373 14400 # Node ID 35180ade80c1cd90202b0b2103e234f83d175603 # Parent 9134c4e46084dc0c7efefed3003a0b7f6052ee0e tests: fix bytes/str issues in run-tests.py caught by python3 Differential Revision: https://phab.mercurial-scm.org/D4143 diff -r 9134c4e46084 -r 35180ade80c1 tests/run-tests.py --- a/tests/run-tests.py Mon Aug 06 16:45:25 2018 -0700 +++ b/tests/run-tests.py Mon Aug 06 17:19:33 2018 -0400 @@ -1247,8 +1247,8 @@ self._allcases = {x for y in parsettestcases(path) for x in y} super(TTest, self).__init__(path, *args, **kwds) if case: - casepath = _strpath('#'.join(case)) - self.name = '%s#%s' % (self.name, casepath) + casepath = b'#'.join(case) + self.name = '%s#%s' % (self.name, _strpath(casepath)) self.errpath = b'%s#%s.err' % (self.errpath[:-4], casepath) self._tmpname += b'-%s' % casepath self._have = {} @@ -1371,7 +1371,7 @@ if os.getenv('MSYSTEM'): script.append(b'alias pwd="pwd -W"\n') if self._case: - casestr = '#'.join(self._case) + casestr = b'#'.join(self._case) if isinstance(self._case, str): quoted = shellquote(casestr) else: @@ -2680,7 +2680,7 @@ if m is not None: t, _, casestr = m.groups() if casestr: - case = casestr.split('#') + case = casestr.split(b'#') else: continue @@ -2726,7 +2726,7 @@ desc = testdescs[0] # desc['path'] is a relative path if 'case' in desc: - casestr = '#'.join(desc['case']) + casestr = b'#'.join(desc['case']) errpath = b'%s#%s.err' % (desc['path'], casestr) else: errpath = b'%s.err' % desc['path']