Patchwork D5835: tests: fix test-match.py on Python3

login
register
mail settings
Submitter phabricator
Date Feb. 4, 2019, 11:35 p.m.
Message ID <9febd9066186de941304832fc0aa225e@localhost.localdomain>
Download mbox | patch
Permalink /patch/38397/
State Not Applicable
Headers show

Comments

phabricator - Feb. 4, 2019, 11:35 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG4dd07bf84608: tests: fix test-match.py on Python3 (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5835?vs=13762&id=13774

REVISION DETAIL
  https://phab.mercurial-scm.org/D5835

AFFECTED FILES
  tests/test-match.py

CHANGE DETAILS




To: durin42, #hg-reviewers, martinvonz
Cc: mercurial-devel

Patch

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 @@ 
         # 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 @@ 
         # 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 @@ 
         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