Exemple #1
0
    def test_patch_clean_handles_multiple_files(self):
        diff = get_simple_patch() + get_hg_new_file_patch() + get_hg_modified_file_patch()

        expected = get_simple_patch() + get_hg_new_file_patch(False) + get_hg_modified_file_patch(False)

        result = patch.clean(diff)
        self.assertEqual(expected, result)
Exemple #2
0
 def test_patch_clean_leaves_simple_patch_unmodified(self):
     result = patch.clean(get_simple_patch())
     self.assertEqual(get_simple_patch(), result)
Exemple #3
0
 def test_patch_clean_does_not_mangle_inner_patch(self):
     result = patch.clean(get_hg_new_file_patch_containing_patch())
     self.assertEqual(get_hg_new_file_patch_containing_patch(False), result)
Exemple #4
0
 def test_patch_clean_removes_ab_prefix_for_modifed_files(self):
     result = patch.clean(get_hg_modified_file_patch())
     self.assertEqual(get_hg_modified_file_patch(False), result)