]> 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 c330f66453c7313e21705435b6d4346677d92d82..dc49330c43766dd61c52327559c8badf51e5246f 100644 (file)
@@ -1,4 +1,5 @@
 
+from __future__ import absolute_import
 from subprocess import check_call
 import struct, os, time
 
@@ -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 = next(it)
-            for buf in next(it):
+            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)