~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_patches.py

  • Committer: John Arbash Meinel
  • Date: 2007-05-04 18:59:36 UTC
  • mto: This revision was merged to the branch mainline in revision 2643.
  • Revision ID: john@arbash-meinel.com-20070504185936-1mjdoqmtz74xe5mg
A C implementation of _fields_to_entry_0_parents drops the time from 400ms to 330ms for a 21k-entry tree

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
        assert (hunk.mod_range == 0)
75
75
        assert (str(hunk) == header)
76
76
 
77
 
    def testPDiff(self):
78
 
        """Parse a hunk header produced by diff -p"""
79
 
        header = "@@ -407,7 +292,7 @@ bzr 0.18rc1  2007-07-10\n"
80
 
        hunk = hunk_from_header(header)
81
 
        self.assertEqual('bzr 0.18rc1  2007-07-10', hunk.tail)
82
 
        self.assertEqual(header, str(hunk))
83
 
 
84
77
    def makeMalformed(self, header):
85
78
        self.assertRaises(MalformedHunkHeader, hunk_from_header, header)
86
79