~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_testament.py

  • Committer: Andrew Bennetts
  • Date: 2010-10-08 04:25:10 UTC
  • mto: This revision was merged to the branch mainline in revision 5472.
  • Revision ID: andrew.bennetts@canonical.com-20101008042510-sg9vdhmnggilzxsk
Fix stray TAB in source.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2010 Canonical Ltd
 
1
# Copyright (C) 2005, 2006 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
22
22
 
23
23
from bzrlib import osutils
24
24
from bzrlib.tests import SymlinkFeature, TestCaseWithTransport
25
 
from bzrlib.testament import (
26
 
    Testament,
27
 
    StrictTestament,
28
 
    StrictTestament3,
29
 
    )
 
25
from bzrlib.testament import Testament, StrictTestament, StrictTestament3
30
26
from bzrlib.transform import TreeTransform
31
27
 
32
28
 
133
129
            timestamp=1129025493,
134
130
            timezone=36000,
135
131
            rev_id='test@user-3',
136
 
            committer=u'Erik B\xe5gfors <test@user>',
 
132
            committer='Erik B\xe5gfors <test@user>',
137
133
            revprops={'uni':u'\xb5'}
138
134
            )
139
135
        t = self.from_revision(self.b.repository, 'test@user-3')
140
136
        self.assertEqualDiff(
141
137
            self.expected('sample_unicode').encode('utf-8'), t.as_text())
142
138
 
143
 
    def test_from_tree(self):
144
 
        tree = self.b.repository.revision_tree('test@user-2')
145
 
        testament = self.testament_class().from_revision_tree(tree)
146
 
        text_1 = testament.as_short_text()
147
 
        text_2 = self.from_revision(self.b.repository,
148
 
                                    'test@user-2').as_short_text()
149
 
        self.assertEqual(text_1, text_2)
150
 
 
151
139
    def test___init__(self):
152
140
        revision = self.b.repository.get_revision('test@user-2')
153
 
        tree = self.b.repository.revision_tree('test@user-2')
154
 
        testament_1 = self.testament_class()(revision, tree)
 
141
        inventory = self.b.repository.get_inventory('test@user-2')
 
142
        testament_1 = self.testament_class()(revision, inventory)
155
143
        text_1 = testament_1.as_short_text()
156
144
        text_2 = self.from_revision(self.b.repository,
157
145
                                    'test@user-2').as_short_text()