git.samba.org
/
jelmer
/
dulwich-libgit2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b3832ef
)
Cope with diffstat not being present in test_patch.
author
Jelmer Vernooij
<jelmer@samba.org>
Thu, 15 Apr 2010 17:51:21 +0000
(19:51 +0200)
committer
Dave Borowitz
<dborowitz@google.com>
Fri, 16 Apr 2010 18:56:53 +0000
(11:56 -0700)
dulwich/tests/test_patch.py
patch
|
blob
|
history
diff --git
a/dulwich/tests/test_patch.py
b/dulwich/tests/test_patch.py
index 63c6b940b76db06f76a5a129cabb5a8c774f2bc0..19e42db18a30c216f544b16537fec19c5722cfe7 100644
(file)
--- a/
dulwich/tests/test_patch.py
+++ b/
dulwich/tests/test_patch.py
@@
-51,8
+51,11
@@
class WriteCommitPatchTests(TestCase):
"And this is the second line.\n",
"\n",
"\n",
- "---\n"
,
- " 0 files changed\n",
+ "---\n"
], lines[3:8])
+ self.assertEquals([
"\n",
"CONTENTS-- \n",
- "custom\n"], lines[3:])
+ "custom\n"], lines[-3:])
+ if len(lines) >= 12:
+ # diffstat may not be present
+ self.assertEquals(lines[8], " 0 files changed\n")