/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_patches.py

Merge cleanup into shell-like-tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
156
156
        self.assertContainsRe(str(patches[0]),
157
157
                                  'Binary files bar\t.* and qux\t.* differ\n')
158
158
 
 
159
    def test_parse_binary_after_normal(self):
 
160
        patches = parse_patches(self.data_lines("binary-after-normal.patch"))
 
161
        self.assertIs(BinaryPatch, patches[1].__class__)
 
162
        self.assertIs(Patch, patches[0].__class__)
 
163
        self.assertContainsRe(patches[1].oldname, '^bar\t')
 
164
        self.assertContainsRe(patches[1].newname, '^qux\t')
 
165
        self.assertContainsRe(str(patches[1]),
 
166
                                  'Binary files bar\t.* and qux\t.* differ\n')
 
167
 
159
168
    def test_roundtrip_binary(self):
160
169
        patchtext = ''.join(self.data_lines("binary.patch"))
161
170
        patches = parse_patches(patchtext.splitlines(True))