/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: Jelmer Vernooij
  • Date: 2011-11-02 11:11:06 UTC
  • mfrom: (734.1.55 gtk3)
  • Revision ID: jelmer@samba.org-20111102111106-7l0vso8eg24dpf87
Merge gtk3 support from Curtis.

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(),
42
53
        b = builder.get_branch()
43
54
 
44
55
        rv = revisionview.RevisionView(b)
 
56
        self.addCleanup(rv.destroy)
45
57
        rev = b.repository.get_revision('A')
46
58
        rv.set_revision(rev)
47
59
        self.assertEqual(rev.committer, rv.committer.get_text())
62
74
        b = tree.branch
63
75
 
64
76
        rv = revisionview.RevisionView(b)
 
77
        self.addCleanup(rv.destroy)
65
78
        rev = b.repository.get_revision('A')
66
79
        rv.set_revision(rev)
67
80
 
82
95
        b = tree.branch
83
96
 
84
97
        rv = revisionview.RevisionView(b)
 
98
        self.addCleanup(rv.destroy)
85
99
        rev = b.repository.get_revision('A')
86
100
        rv.set_revision(rev)
87
101