~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_diff.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-12-12 12:34:32 UTC
  • mfrom: (2172.2.1 selftest.fixes)
  • Revision ID: pqm@pqm.ubuntu.com-20061212123432-6640bfa4477523fc
(bialix) Remove unnecessary duplication of tests in blackbox/test_diff.py

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
                  'YYYY-MM-DD HH:MM:SS +ZZZZ', string)
35
35
 
36
36
 
37
 
class TestDiff(ExternalBase):
 
37
class DiffBase(ExternalBase):
 
38
    """Base class with common setup method"""
38
39
 
39
40
    def make_example_branch(self):
40
41
        # FIXME: copied from test_too_much -- share elsewhere?
46
47
        tree.add(['goodbye'])
47
48
        tree.commit('setup')
48
49
 
 
50
 
 
51
class TestDiff(DiffBase):
 
52
 
49
53
    def test_diff(self):
50
54
        self.make_example_branch()
51
55
        file('hello', 'wt').write('hello world!')
230
234
        os.chdir('checkouts')
231
235
 
232
236
 
233
 
class TestDiffLabels(TestDiff):
 
237
class TestDiffLabels(DiffBase):
234
238
 
235
239
    def test_diff_label_removed(self):
236
240
        super(TestDiffLabels, self).make_example_branch()
258
262
        self.assertTrue("=== renamed file 'hello' => 'gruezi'" in diff[0])
259
263
 
260
264
 
261
 
class TestExternalDiff(TestDiff):
 
265
class TestExternalDiff(DiffBase):
262
266
 
263
267
    def test_external_diff(self):
264
268
        """Test that we can spawn an external diff process"""