~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_patches.py

  • Committer: Kit Randel
  • Date: 2014-12-10 07:54:47 UTC
  • mto: This revision was merged to the branch mainline in revision 6602.
  • Revision ID: kit.randel@canonical.com-20141210075447-k6n780w8dsgwunxs
test_parse_patches_file_modified_header only needs to parse a single patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
    def test_parse_patches_file_modified_header(self):
66
66
        """Parse a patch containing a file modified header"""
67
67
        # https://bugs.launchpad.net/bzr/+bug/1400567
68
 
 
69
68
        lines = ["=== modified file 'orig/commands.py'\n",
70
69
                 "--- orig/commands.py\n",
71
70
                 "+++ mod/dommands.py\n"]
72
 
 
73
 
        # XXX: just parse 1 patch
74
 
        patches = parse_patches(lines, allow_dirty=True)
75
 
        for patch in patches:
76
 
            self.assertEqual(patch.get_modified_header(),
77
 
                             "=== modified file 'orig/commands.py'")
 
71
        patch = parse_patch(lines.__iter__())
 
72
        self.assertEqual(patch.get_modified_header(),
 
73
                         "=== modified file 'orig/commands.py'")
78
74
 
79
75
    def testValidPatchHeader(self):
80
76
        """Parse a valid patch header"""