]> arthur.barton.de Git - bup.git/blobdiff - lib/bup/t/tgit.py
Use absolute_import from the __future__ everywhere
[bup.git] / lib / bup / t / tgit.py
index cacec6b05157cf45cded4228b58acbde324f95fa..dc49330c43766dd61c52327559c8badf51e5246f 100644 (file)
@@ -1,4 +1,5 @@
 
+from __future__ import absolute_import
 from subprocess import check_call
 import struct, os, time
 
@@ -116,7 +117,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))
 
@@ -431,14 +432,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)