Ignore first part of type output
authorGuido Günther <agx@sigxcpu.org>
Thu, 19 Feb 2015 21:40:31 +0000 (22:40 +0100)
committerGuido Günther <agx@sigxcpu.org>
Sat, 21 Feb 2015 10:44:37 +0000 (11:44 +0100)
Types are classes in python3 so we get 'class' instead of 'type'.
Ignore that detail in the matcher since it's not relevanthere.

tests/test_GitRepository.py

index 0da7c2fdce5decdca844b56a11a3efe7ef5dfcb6..957c6077a03a1601d37cc71589f0e723bb68d62a 100644 (file)
@@ -468,8 +468,8 @@ def test_get_commit_info():
     True
     >>> info['patchname']
     'foo'
-    >>> info['files']
-    defaultdict(<type 'list'>, {'M': ['testfile']})
+    >>> info['files']                               # doctest:+ELLIPSIS
+    defaultdict(<... 'list'>, {'M': ['testfile']})
     >>> repo.get_subject('HEAD')
     'foo'
     """
@@ -500,10 +500,10 @@ def test_diff_status():
 
     >>> import gbp.git
     >>> repo = gbp.git.GitRepository(repo_dir)
-    >>> repo.diff_status("HEAD", "HEAD")
-    defaultdict(<type 'list'>, {})
-    >>> repo.diff_status("HEAD~1", "HEAD")
-    defaultdict(<type 'list'>, {'M': ['testfile']})
+    >>> repo.diff_status("HEAD", "HEAD")            # doctest:+ELLIPSIS
+    defaultdict(<... 'list'>, {})
+    >>> repo.diff_status("HEAD~1", "HEAD")          # doctest:+ELLIPSIS
+    defaultdict(<... 'list'>, {'M': ['testfile']})
     """
 
 def test_mirror_clone():