Convert result to list
authorGuido Günther <agx@sigxcpu.org>
Thu, 19 Feb 2015 21:41:02 +0000 (22:41 +0100)
committerGuido Günther <agx@sigxcpu.org>
Fri, 20 Feb 2015 11:59:05 +0000 (12:59 +0100)
Python3 returns a dict_items obj

tests/test_GitRepository.py

index 4e344015466b24e34899a08a39e703efa8c75ff3..0da7c2fdce5decdca844b56a11a3efe7ef5dfcb6 100644 (file)
@@ -890,16 +890,16 @@ def test_status():
     >>> repo = gbp.git.GitRepository(repo_dir)
     >>> fname = os.path.join(repo.path, "test_status")
     >>> ret = shutil.copy(os.path.join(repo.path, ".git/HEAD"), fname)
-    >>> repo.status().items()
+    >>> list(repo.status().items())
     [('??', ['test_status'])]
-    >>> repo.status(['bla*']).items()
+    >>> list(repo.status(['bla*']).items())
     []
-    >>> repo.status(['te*']).items()
+    >>> list(repo.status(['te*']).items())
     [('??', ['test_status'])]
     >>> repo.add_files(repo.path, force=True)
     >>> repo.commit_all(msg='added %s' % fname)
     >>> _ = repo._git_inout('mv', [fname, fname + 'new'])
-    >>> repo.status().items()
+    >>> list(repo.status().items())
     [('R ', ['test_status\x00test_statusnew'])]
     """