~jelmer/bzr-loom/lp-pqm

« back to all changes in this revision

Viewing changes to tests/blackbox.py

  • Committer: Jelmer Vernooij
  • Date: 2011-12-21 20:50:57 UTC
  • mfrom: (34.20.53 trunk)
  • mto: This revision was merged to the branch mainline in revision 52.
  • Revision ID: jelmer@samba.org-20111221205057-m65gvc689r9zd0aq
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
        tree.commit('first release')
53
53
        self.run_bzr(['loomify', path])
54
54
        return tree.bzrdir.open_workingtree()
55
 
    
 
55
 
56
56
    def assert_exception_raised_on_non_loom_branch(self, args):
57
57
        """Helper to check UserError gets raised when commands are run in a non-loomed branch."""
58
58
        tree = self.make_branch_and_tree('.')
104
104
 
105
105
 
106
106
class TestCreate(TestsWithLooms):
107
 
    
 
107
 
108
108
    def test_create_no_changes(self):
109
109
        tree = self.get_vendor_loom()
110
110
        out, err = self.run_bzr(['create-thread', 'debian'])
140
140
 
141
141
 
142
142
class TestShow(TestsWithLooms):
143
 
    
 
143
 
144
144
    def test_show_loom(self):
145
145
        """Show the threads in the loom."""
146
146
        tree = self.get_vendor_loom()
184
184
 
185
185
class TestStatus(TestsWithLooms):
186
186
 
 
187
    def setUp(self):
 
188
        super(TestStatus, self).setUp()
 
189
        # The test suite resets after each run, so manually register
 
190
        # the loom status hook.
 
191
        try:
 
192
            from bzrlib.hooks import install_lazy_named_hook
 
193
        except ImportError:
 
194
            pass
 
195
        else:
 
196
            from bzrlib.plugins.loom import show_loom_summary
 
197
            install_lazy_named_hook('bzrlib.status', 'hooks', 'post_status',
 
198
                show_loom_summary, 'loom status')
 
199
 
187
200
    def test_status_shows_current_thread(self):
188
201
        # 'bzr status' shows the current thread.
189
202
        tree = self.get_vendor_loom()
227
240
 
228
241
 
229
242
class TestSwitch(TestsWithLooms):
230
 
    
 
243
 
231
244
    def test_switch_thread_up_does_not_merge(self):
232
245
        tree = self.get_vendor_loom()
233
246
        self._add_patch(tree, 'thread1')