tests/test-manifest.py
changeset 43949 8b1a9ba375e5
parent 43076 2372284d9457
child 43964 8f67735344ae
--- a/tests/test-manifest.py	Fri Dec 06 20:29:02 2019 -0500
+++ b/tests/test-manifest.py	Fri Dec 13 11:21:31 2019 -0800
@@ -169,7 +169,7 @@
         m[b'foo'] = want + b'+'
         self.assertEqual(want, m[b'foo'])
         # make sure the suffix survives a copy
-        match = matchmod.match(b'', b'', [b're:foo'])
+        match = matchmod.match(b'/repo', b'', [b're:foo'])
         m2 = m.matches(match)
         self.assertEqual(want, m2[b'foo'])
         self.assertEqual(1, len(m2))
@@ -186,7 +186,7 @@
 
     def testMatchException(self):
         m = self.parsemanifest(A_SHORT_MANIFEST)
-        match = matchmod.match(b'', b'', [b're:.*'])
+        match = matchmod.match(b'/repo', b'', [b're:.*'])
 
         def filt(path):
             if path == b'foo':
@@ -328,7 +328,7 @@
         actually exist.'''
         m = self.parsemanifest(A_DEEPER_MANIFEST)
 
-        match = matchmod.match(b'/', b'', [b'a/f'], default=b'relpath')
+        match = matchmod.match(b'/repo', b'', [b'a/f'], default=b'relpath')
         m2 = m.matches(match)
 
         self.assertEqual([], m2.keys())
@@ -348,7 +348,7 @@
         '''Tests matches() for what should be a full match.'''
         m = self.parsemanifest(A_DEEPER_MANIFEST)
 
-        match = matchmod.match(b'/', b'', [b''])
+        match = matchmod.match(b'/repo', b'', [b''])
         m2 = m.matches(match)
 
         self.assertEqual(m.keys(), m2.keys())
@@ -358,7 +358,7 @@
         match against all files within said directory.'''
         m = self.parsemanifest(A_DEEPER_MANIFEST)
 
-        match = matchmod.match(b'/', b'', [b'a/b'], default=b'relpath')
+        match = matchmod.match(b'/repo', b'', [b'a/b'], default=b'relpath')
         m2 = m.matches(match)
 
         self.assertEqual(
@@ -392,7 +392,7 @@
         when not in the root directory.'''
         m = self.parsemanifest(A_DEEPER_MANIFEST)
 
-        match = matchmod.match(b'/', b'a/b', [b'.'], default=b'relpath')
+        match = matchmod.match(b'/repo', b'a/b', [b'.'], default=b'relpath')
         m2 = m.matches(match)
 
         self.assertEqual(
@@ -415,7 +415,7 @@
         deeper than the specified directory.'''
         m = self.parsemanifest(A_DEEPER_MANIFEST)
 
-        match = matchmod.match(b'/', b'', [b'a/b/*/*.txt'])
+        match = matchmod.match(b'/repo', b'', [b'a/b/*/*.txt'])
         m2 = m.matches(match)
 
         self.assertEqual(
@@ -467,7 +467,7 @@
             sorted(dirs),
         )
 
-        match = matchmod.match(b'/', b'', [b'path:a/b/'])
+        match = matchmod.match(b'/repo', b'', [b'path:a/b/'])
         dirs = [s._dir for s in m.walksubtrees(matcher=match)]
         self.assertEqual(sorted([b'a/b/', b'a/b/c/', b'a/b/d/']), sorted(dirs))