~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_shelf_ui.py

  • Committer: Martin Pool
  • Date: 2011-06-14 02:21:41 UTC
  • mto: This revision was merged to the branch mainline in revision 6001.
  • Revision ID: mbp@canonical.com-20110614022141-18hmm7s0iw3utcbj
Deprecate __contains__ on Tree and Inventory

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
LINES_AY = 'a\nb\nc\nd\ne\nf\ng\nh\ni\ny\n'
64
64
 
65
65
 
66
 
class TestShelver(tests.TestCaseWithTransport):
 
66
class ShelfTestCase(tests.TestCaseWithTransport):
67
67
 
68
68
    def create_shelvable_tree(self):
69
69
        tree = self.make_branch_and_tree('tree')
73
73
        self.build_tree_contents([('tree/foo', LINES_ZY)])
74
74
        return tree
75
75
 
 
76
 
 
77
class TestShelver(ShelfTestCase):
 
78
 
76
79
    def test_unexpected_prompt_failure(self):
77
80
        tree = self.create_shelvable_tree()
78
81
        tree.lock_tree_write()
190
193
        shelver.expect('Shelve adding file "foo"? [yNfq?]', 'y')
191
194
        shelver.expect('Shelve 1 change(s)? [yNfq?]', 'y')
192
195
        shelver.run()
193
 
        self.failIfExists('tree/foo')
 
196
        self.assertPathDoesNotExist('tree/foo')
194
197
 
195
198
    def test_shelve_kind_change(self):
196
199
        tree = self.create_shelvable_tree()
327
330
                           outer_tree, rev2)
328
331
 
329
332
 
330
 
class TestApplyReporter(TestShelver):
 
333
class TestApplyReporter(ShelfTestCase):
331
334
 
332
335
    def test_shelve_not_diff(self):
333
336
        tree = self.create_shelvable_tree()
422
425
        shelver.expect('Delete file "foo"? [yNfq?]', 'y')
423
426
        shelver.expect('Apply 1 change(s)? [yNfq?]', 'y')
424
427
        shelver.run()
425
 
        self.failIfExists('tree/foo')
 
428
        self.assertPathDoesNotExist('tree/foo')
426
429
 
427
430
    def test_shelve_kind_change(self):
428
431
        tree = self.create_shelvable_tree()