~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-15 20:24:42 UTC
  • mto: This revision was merged to the branch mainline in revision 6602.
  • Revision ID: kit.randel@canonical.com-20141215202442-usf2ixhypqg8yh6q
added a note for bug-1400567 to the 2.7b release notes

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
        lines = ["=== added directory 'foo/bar'\n",
68
68
                 "=== modified file 'orig/commands.py'\n",
69
69
                 "--- orig/commands.py\n",
70
 
                 "+++ mod/dommands.py\n",
71
 
                 "=== modified file 'orig/another.py'\n",
72
 
                 "--- orig/another.py\n",
73
 
                 "+++ mod/another.py\n"]
 
70
                 "+++ mod/dommands.py\n"]
74
71
        patches = parse_patches(
75
72
            lines.__iter__(), allow_dirty=True, keep_dirty=True)
76
 
        self.assertLength(2, patches)
77
73
        self.assertEqual(patches[0]['dirty_head'],
78
74
                         ["=== added directory 'foo/bar'\n",
79
75
                          "=== modified file 'orig/commands.py'\n"])
80
76
        self.assertEqual(patches[0]['patch'].get_header().splitlines(True),
81
77
                         ["--- orig/commands.py\n", "+++ mod/dommands.py\n"])
82
 
        self.assertEqual(patches[1]['dirty_head'],
83
 
                         ["=== modified file 'orig/another.py'\n"])
84
 
        self.assertEqual(patches[1]['patch'].get_header().splitlines(True),
85
 
                         ["--- orig/another.py\n", "+++ mod/another.py\n"])
86
78
 
87
79
    def testValidPatchHeader(self):
88
80
        """Parse a valid patch header"""