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

  • Committer: Curtis Hovey
  • Date: 2011-09-04 03:48:04 UTC
  • mfrom: (737.1.3 fix-threads-icons)
  • Revision ID: sinzui.is@verizon.net-20110904034804-u7nod7mzximvqu8l
Fix icon and running thread issues reported by the test suite.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""Test the RevisionView functionality."""
18
18
 
 
19
import os
 
20
 
19
21
from bzrlib import (
20
22
    tests,
21
23
    )
27
29
from bzrlib.plugins.gtk import revisionview
28
30
 
29
31
 
 
32
def fake_icon_path(*args):
 
33
    return os.path.join(
 
34
        os.path.dirname(__file__),  '..', 'icons', *args)
 
35
 
 
36
 
30
37
class TestPendingRevisions(tests.TestCaseWithMemoryTransport):
31
38
 
 
39
    def setUp(self):
 
40
        super(TestPendingRevisions, self).setUp()
 
41
        self.overrideAttr(revisionview, 'icon_path', new=fake_icon_path)
 
42
 
32
43
    def assertBufferText(self, text, buffer):
33
44
        """Check the text stored in the buffer."""
34
45
        self.assertEqual(text, buffer.get_text(buffer.get_start_iter(),
41
52
        b = builder.get_branch()
42
53
 
43
54
        rv = revisionview.RevisionView(b)
 
55
        self.addCleanup(rv.destroy)
44
56
        rev = b.repository.get_revision('A')
45
57
        rv.set_revision(rev)
46
58
        self.assertEqual(rev.committer, rv.committer.get_text())
61
73
        b = tree.branch
62
74
 
63
75
        rv = revisionview.RevisionView(b)
 
76
        self.addCleanup(rv.destroy)
64
77
        rev = b.repository.get_revision('A')
65
78
        rv.set_revision(rev)
66
79
 
81
94
        b = tree.branch
82
95
 
83
96
        rv = revisionview.RevisionView(b)
 
97
        self.addCleanup(rv.destroy)
84
98
        rev = b.repository.get_revision('A')
85
99
        rv.set_revision(rev)
86
100