/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/test_testament.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-11-16 18:59:44 UTC
  • mfrom: (7143.15.15 more-cleanups)
  • Revision ID: breezy.the.bot@gmail.com-20181116185944-biefv1sub37qfybm
Sprinkle some PEP8iness.

Merged from https://code.launchpad.net/~jelmer/brz/more-cleanups/+merge/358611

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
        b = self.b = self.wt.branch
43
43
        b.nick = "test branch"
44
44
        self.wt.commit(message='initial null commit',
45
 
                 committer='test@user',
46
 
                 timestamp=1129025423, # 'Tue Oct 11 20:10:23 2005'
47
 
                 timezone=0,
48
 
                 rev_id=b'test@user-1')
 
45
                       committer='test@user',
 
46
                       timestamp=1129025423,  # 'Tue Oct 11 20:10:23 2005'
 
47
                       timezone=0,
 
48
                       rev_id=b'test@user-1')
49
49
        self.build_tree_contents([('hello', b'contents of hello file'),
50
 
                             ('src/', ),
51
 
                             ('src/foo.c', b'int main()\n{\n}\n')])
 
50
                                  ('src/', ),
 
51
                                  ('src/foo.c', b'int main()\n{\n}\n')])
52
52
        self.wt.add(['hello', 'src', 'src/foo.c'],
53
 
                             [b'hello-id', b'src-id', b'foo.c-id'])
 
53
                    [b'hello-id', b'src-id', b'foo.c-id'])
54
54
        tt = TreeTransform(self.wt)
55
55
        trans_id = tt.trans_id_tree_path('hello')
56
56
        tt.set_executability(True, trans_id)
57
57
        tt.apply()
58
58
        self.wt.commit(message='add files and directories',
59
 
                 timestamp=1129025483,
60
 
                 timezone=36000,
61
 
                 rev_id=b'test@user-2',
62
 
                 committer='test@user')
 
59
                       timestamp=1129025483,
 
60
                       timezone=36000,
 
61
                       rev_id=b'test@user-2',
 
62
                       committer='test@user')
63
63
 
64
64
 
65
65
class TestamentTests(TestamentSetup):
108
108
        os.symlink('wibble/linktarget', 'link')
109
109
        self.wt.add(['link'], [b'link-id'])
110
110
        self.wt.commit(message='add symlink',
111
 
                 timestamp=1129025493,
112
 
                 timezone=36000,
113
 
                 rev_id=b'test@user-3',
114
 
                 committer='test@user')
 
111
                       timestamp=1129025493,
 
112
                       timezone=36000,
 
113
                       rev_id=b'test@user-3',
 
114
                       committer='test@user')
115
115
        t = self.from_revision(self.b.repository, b'test@user-3')
116
116
        self.assertEqualDiff(t.as_text(), self.expected('rev_3'))
117
117
 
122
122
                 u'empty': '',
123
123
                 }
124
124
        self.wt.commit(message='revision with properties',
125
 
                      timestamp=1129025493,
126
 
                      timezone=36000,
127
 
                      rev_id=b'test@user-3',
128
 
                      committer='test@user',
129
 
                      revprops=props)
 
125
                       timestamp=1129025493,
 
126
                       timezone=36000,
 
127
                       rev_id=b'test@user-3',
 
128
                       committer='test@user',
 
129
                       revprops=props)
130
130
        t = self.from_revision(self.b.repository, b'test@user-3')
131
131
        self.assertEqualDiff(t.as_text(), self.expected('rev_props'))
132
132
 
137
137
            timezone=36000,
138
138
            rev_id=b'test@user-3',
139
139
            committer=u'Erik B\xe5gfors <test@user>',
140
 
            revprops={u'uni':u'\xb5'}
 
140
            revprops={u'uni': u'\xb5'}
141
141
            )
142
142
        t = self.from_revision(self.b.repository, b'test@user-3')
143
143
        self.assertEqualDiff(
536
536
 
537
537
 
538
538
texts = {
539
 
    Testament: { 'rev_1': REV_1_TESTAMENT,
540
 
                 'rev_1_short': REV_1_SHORT,
541
 
                 'rev_2': REV_2_TESTAMENT,
542
 
                 'rev_2_short': REV_2_SHORT,
543
 
                 'rev_3': REV_3_TESTAMENT,
544
 
                 'rev_props': REV_PROPS_TESTAMENT,
545
 
                 'sample_unicode': SAMPLE_UNICODE_TESTAMENT,
546
 
    },
 
539
    Testament: {'rev_1': REV_1_TESTAMENT,
 
540
                'rev_1_short': REV_1_SHORT,
 
541
                'rev_2': REV_2_TESTAMENT,
 
542
                'rev_2_short': REV_2_SHORT,
 
543
                'rev_3': REV_3_TESTAMENT,
 
544
                'rev_props': REV_PROPS_TESTAMENT,
 
545
                'sample_unicode': SAMPLE_UNICODE_TESTAMENT,
 
546
                },
547
547
    StrictTestament: {'rev_1': REV_1_STRICT_TESTAMENT,
548
548
                      'rev_1_short': REV_1_SHORT_STRICT,
549
549
                      'rev_2': REV_2_STRICT_TESTAMENT,
551
551
                      'rev_3': REV_3_TESTAMENT_STRICT,
552
552
                      'rev_props': REV_PROPS_TESTAMENT_STRICT,
553
553
                      'sample_unicode': SAMPLE_UNICODE_TESTAMENT_STRICT,
554
 
    },
 
554
                      },
555
555
    StrictTestament3: {'rev_1': REV_1_STRICT_TESTAMENT3,
556
 
                      'rev_1_short': REV_1_SHORT_STRICT3,
557
 
                      'rev_2': REV_2_STRICT_TESTAMENT3,
558
 
                      'rev_2_short': REV_2_SHORT_STRICT3,
559
 
                      'rev_3': REV_3_TESTAMENT_STRICT3,
560
 
                      'rev_props': REV_PROPS_TESTAMENT_STRICT3,
561
 
                      'sample_unicode': SAMPLE_UNICODE_TESTAMENT_STRICT3,
562
 
    },
 
556
                       'rev_1_short': REV_1_SHORT_STRICT3,
 
557
                       'rev_2': REV_2_STRICT_TESTAMENT3,
 
558
                       'rev_2_short': REV_2_SHORT_STRICT3,
 
559
                       'rev_3': REV_3_TESTAMENT_STRICT3,
 
560
                       'rev_props': REV_PROPS_TESTAMENT_STRICT3,
 
561
                       'sample_unicode': SAMPLE_UNICODE_TESTAMENT_STRICT3,
 
562
                       },
563
563
}