/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_diff.py

  • Committer: Aaron Bentley
  • Date: 2008-05-12 20:21:45 UTC
  • mto: This revision was merged to the branch mainline in revision 492.
  • Revision ID: aaron@aaronbentley.com-20080512202145-7dh7wm8avi3ud47q
Update error handling to use window

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
from cStringIO import StringIO
19
19
import os
20
20
 
21
 
from bzrlib import tests
 
21
from bzrlib import errors, tests
22
22
from bzrlib.merge_directive import MergeDirective
23
23
 
24
24
from bzrlib.plugins.gtk.diff import (
121
121
    def _conflicts(self):
122
122
        self.conflicts = True
123
123
 
 
124
    def _handle_error(self, e):
 
125
        self.handled_error = e
 
126
 
124
127
 
125
128
class TestDiffController(tests.TestCaseWithTransport):
126
129
 
197
200
        self.assertEqual(other.last_revision(), this.get_parent_ids()[1])
198
201
        self.assertFileEqual('bar', 'this/foo')
199
202
 
 
203
    def test_perform_merge_uncommitted_changes(self):
 
204
        this, other, directive = self.make_this_other_directive()
 
205
        self.build_tree_contents([('this/foo', 'bar')])
 
206
        this.add('foo')
 
207
        window = self.make_merged_window(directive)
 
208
        self.assertIsInstance(window.handled_error, errors.UncommittedChanges)
 
209
 
200
210
 
201
211
class Test_IterChangesToStatus(tests.TestCaseWithTransport):
202
212