# HG changeset patch # User Augie Fackler # Date 2019-02-04 22:06:22 # Node ID 4dd07bf846085347a361c7f79e90b0110e83d668 # Parent 13a6dd952ffe184a614b5ba1ac146b159867c475 tests: fix test-match.py on Python3 # skip-blame just b prefixes Differential Revision: https://phab.mercurial-scm.org/D5835 diff --git a/tests/test-match.py b/tests/test-match.py --- a/tests/test-match.py +++ b/tests/test-match.py @@ -261,13 +261,13 @@ class DifferenceMatcherTests(unittest.Te # assertTrue does NOT verify that it's a bool, just that it's truthy. # While we may want to eventually make these return 'all', they should # not currently do so. - self.assertEqual(dm.visitdir(b'.'), 'all') - self.assertEqual(dm.visitdir(b'dir'), 'all') - self.assertEqual(dm.visitdir(b'dir/subdir'), 'all') - self.assertEqual(dm.visitdir(b'dir/subdir/z'), 'all') - self.assertEqual(dm.visitdir(b'dir/foo'), 'all') - self.assertEqual(dm.visitdir(b'dir/subdir/x'), 'all') - self.assertEqual(dm.visitdir(b'folder'), 'all') + self.assertEqual(dm.visitdir(b'.'), b'all') + self.assertEqual(dm.visitdir(b'dir'), b'all') + self.assertEqual(dm.visitdir(b'dir/subdir'), b'all') + self.assertEqual(dm.visitdir(b'dir/subdir/z'), b'all') + self.assertEqual(dm.visitdir(b'dir/foo'), b'all') + self.assertEqual(dm.visitdir(b'dir/subdir/x'), b'all') + self.assertEqual(dm.visitdir(b'folder'), b'all') def testVisitchildrensetM2never(self): m1 = matchmod.alwaysmatcher(b'', b'') @@ -294,8 +294,8 @@ class DifferenceMatcherTests(unittest.Te # an 'all' pattern, just True. self.assertEqual(dm.visitdir(b'dir/subdir/z'), True) self.assertEqual(dm.visitdir(b'dir/subdir/x'), True) - self.assertEqual(dm.visitdir(b'dir/foo'), 'all') - self.assertEqual(dm.visitdir(b'folder'), 'all') + self.assertEqual(dm.visitdir(b'dir/foo'), b'all') + self.assertEqual(dm.visitdir(b'folder'), b'all') def testVisitchildrensetM2SubdirPrefix(self): m1 = matchmod.alwaysmatcher(b'', b'') @@ -320,7 +320,7 @@ class DifferenceMatcherTests(unittest.Te dm = matchmod.differencematcher(m1, m2) self.assertEqual(dm.visitdir(b'.'), True) self.assertEqual(dm.visitdir(b'dir'), True) - self.assertEqual(dm.visitdir(b'dir/subdir'), 'all') + self.assertEqual(dm.visitdir(b'dir/subdir'), b'all') self.assertFalse(dm.visitdir(b'dir/foo')) self.assertFalse(dm.visitdir(b'folder')) # OPT: We should probably return False for these; we don't because