~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to tests/test_graph.py

  • Committer: Aaron Bentley
  • Date: 2011-09-25 02:01:39 UTC
  • mfrom: (773.1.3 fix-nick-reference)
  • Revision ID: aaron@aaronbentley.com-20110925020139-hkr2kb7jp1vnbs77
Fix bug #263065.  (andialbrecht)

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
 
from bzrlib.tests import TestCase
 
17
from bzrlib.tests import (
 
18
    TestCase,
 
19
    TestCaseWithMemoryTransport,
 
20
    )
18
21
from bzrlib.plugins.bzrtools.graph import (
 
22
    get_rev_info,
19
23
    node_distances,
20
24
    nodes_by_distance,
21
25
    )
67
71
        descendants = self.node_descendants()
68
72
        distances = node_distances(self.graph, descendants, 'A')
69
73
        self.assertEqual(distances['C'], 3)
 
74
 
 
75
 
 
76
class TestGetRevInfo(TestCaseWithMemoryTransport):
 
77
 
 
78
    def test_revision_not_present(self):
 
79
        repo = self.make_repository('foo')
 
80
        revision = 'aaron@aaronbentley.com-20110925012351-s3q6441rx3t'
 
81
        committer, message, nick, date = get_rev_info(revision, repo)
 
82
        self.assertEqual('aaron@aaronbentley.com', committer)
 
83
        self.assertIs(None, message)
 
84
        self.assertIs(None, nick)
 
85
        self.assertIs(None, date)