/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 breezy/plugins/quilt/tests/test_wrapper.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2019-08-31 10:40:08 UTC
  • mfrom: (7381.1.2 quilt-more)
  • Revision ID: breezy.the.bot@gmail.com-20190831104008-jj26pvaaug9s29wx
Add quilt_delete call.

Merged from https://code.launchpad.net/~jelmer/brz/quilt-more/+merge/371831

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
import os
24
24
 
25
25
from ..wrapper import (
 
26
    quilt_delete,
26
27
    quilt_pop_all,
27
28
    quilt_applied,
28
29
    quilt_unapplied,
71
72
        self.make_empty_quilt_dir("source")
72
73
        quilt_push_all("source", quiet=True)
73
74
 
74
 
    def test_poph_all_empty(self):
 
75
    def test_pop_all_empty(self):
75
76
        self.make_empty_quilt_dir("source")
76
77
        quilt_pop_all("source", quiet=True)
77
78
 
97
98
            ("source/patches/patch2.diff", "bazb ar")])
98
99
        self.assertEquals(["patch1.diff", "patch2.diff"],
99
100
                          quilt_unapplied("source", "patches"))
 
101
 
 
102
    def test_delete(self):
 
103
        source = self.make_empty_quilt_dir("source")
 
104
        self.build_tree_contents([
 
105
            ("source/patches/series", "patch1.diff\npatch2.diff"),
 
106
            ("source/patches/patch1.diff", "foob ar"),
 
107
            ("source/patches/patch2.diff", "bazb ar")])
 
108
        quilt_delete("source", "patch1.diff", "patches", remove=False)
 
109
        self.assertEqual(
 
110
            ['patch2.diff'],
 
111
            quilt_series(source, 'patches/series'))
 
112
        quilt_delete("source", "patch2.diff", "patches", remove=True)
 
113
        self.assertTrue(os.path.exists('source/patches/patch1.diff'))
 
114
        self.assertFalse(os.path.exists('source/patches/patch2.diff'))
 
115
        self.assertEqual([], quilt_series(source, 'patches/series'))