/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-23 21:48:33 UTC
  • mfrom: (771.1.7 precise-diff-0)
  • Revision ID: sinzui.is@verizon.net-20120123214833-quehn8fpzszfyr6d
Do not update the diff_view when the treeview is being destroyed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
    commitmsgs,
37
37
    )
38
38
from bzrlib.plugins.gtk.commitmsgs import SavedCommitMessagesManager
 
39
from bzrlib.plugins.gtk.tests import MockMethod
39
40
 
40
41
 
41
42
# TODO: All we need is basic ancestry code to test this, we shouldn't need a
143
144
        pass # With no widgets, there are no widgets to fill out
144
145
 
145
146
 
146
 
class MockMethod():
147
 
 
148
 
    @classmethod
149
 
    def bind(klass, test_instance, obj, method_name):
150
 
        original_method = getattr(obj, method_name)
151
 
        test_instance.addCleanup(setattr, obj, method_name, original_method)
152
 
        setattr(obj, method_name, klass())
153
 
 
154
 
    def __init__(self):
155
 
        self.called = False
156
 
        self.args = None
157
 
        self.kwargs = None
158
 
 
159
 
    def __call__(self, *args, **kwargs):
160
 
        self.called = True
161
 
        self.args = args
162
 
        self.kwargs = kwargs
163
 
 
164
 
 
165
147
class TestCommitDialogSimple(tests.TestCaseWithTransport):
166
148
 
167
149
    def test_init(self):