]> arthur.barton.de Git - bup.git/blobdiff - lib/bup/t/tgit.py
Remove vfs (replaced by vfs2)
[bup.git] / lib / bup / t / tgit.py
index d12924c07246ae4b052d1dd50e7fe35896b16fc2..3d2e903f9337159136e5d7c633a03ab3ac5afe3e 100644 (file)
@@ -116,7 +116,7 @@ def testpacks():
 
             pi = iter(r)
             for h in sorted(hashes):
-                WVPASSEQ(str(pi.next()).encode('hex'), h.encode('hex'))
+                WVPASSEQ(str(next(pi)).encode('hex'), h.encode('hex'))
 
             WVFAIL(r.find_offset('\0'*20))
 
@@ -409,6 +409,7 @@ def test_list_refs():
             WVPASSEQ(frozenset(git.list_refs(limit_to_tags=True)), expected_tags)
 
 
+@wvtest
 def test__git_date_str():
     with no_lingering_errors():
         WVPASSEQ('0 +0000', git._git_date_str(0, 0))
@@ -430,14 +431,13 @@ def test_cat_pipe():
                 print f, 'something else'
             git.init_repo(bupdir)
             exc(bup_exe, 'index', src)
-            exc(bup_exe, 'save', '-n', 'src', '--strip', src)
-            git_type = exo('git', '--git-dir', bupdir,
-                           'cat-file', '-t', 'src').strip()
-            git_size = int(exo('git', '--git-dir', bupdir,
+            oidx = exo(bup_exe, 'save', '-cn', 'src', '--strip', src).strip()
+            typ = exo('git', '--git-dir', bupdir,
+                      'cat-file', '-t', 'src').strip()
+            size = int(exo('git', '--git-dir', bupdir,
                                'cat-file', '-s', 'src'))
-            it = git.cp().get('src', size=True)
-            get_type, get_size = it.next()
+            it = git.cp().get('src')
+            get_info = it.next()
             for buf in it.next():
                 pass
-            WVPASSEQ(get_type, git_type)
-            WVPASSEQ(get_size, git_size)
+            WVPASSEQ((oidx, typ, size), get_info)