/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to tests/test_commit.py

  • Committer: Curtis Hovey
  • Date: 2012-01-22 16:16:04 UTC
  • mto: This revision was merged to the branch mainline in revision 771.
  • Revision ID: sinzui.is@verizon.net-20120122161604-5a8qbeks1oq8uxxd
Added guard to avoid accessing a non-existent treeselection.

Show diffs side-by-side

added added

removed removed

Lines of Context:
232
232
        self.assertEqual([], delta.removed)
233
233
        self.assertEqual([(u'a', 'a-id', 'file')], delta.added)
234
234
 
 
235
    def test_on_treeview_files_cursor_changed_with_destroyed_treeview(self):
 
236
        MockMethod.bind(self, CommitDialogNoWidgets, '_update_per_file_info')
 
237
        tree = self.make_branch_and_tree('tree')
 
238
        rev_id = tree.commit('first')
 
239
        dlg = CommitDialogNoWidgets(tree)
 
240
        treeview = Gtk.TreeView()
 
241
        treeview.destroy()
 
242
        dlg._on_treeview_files_cursor_changed(treeview)
 
243
        self.assertFalse(CommitDialogNoWidgets._update_per_file_info.called)
 
244
 
235
245
 
236
246
class TestCommitDialog(tests.TestCaseWithTransport):
237
247