~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to test_version_info.py

  • Committer: John Arbash Meinel
  • Date: 2006-09-20 14:06:40 UTC
  • mto: (2022.1.1 version-info-55794)
  • mto: This revision was merged to the branch mainline in revision 2028.
  • Revision ID: john@arbash-meinel.com-20060920140640-8dca2f0fdb7564c3
whitespace and formatting cleanups.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
 
37
37
    def create_branch(self):
38
38
        wt = self.make_branch_and_tree('branch')
39
 
        
 
39
 
40
40
        self.build_tree(['branch/a'])
41
41
        wt.add('a')
42
42
        wt.commit('a', rev_id='r1')
55
55
 
56
56
        def regen(**kwargs):
57
57
            sio = StringIO()
58
 
            builder = RioVersionInfoBuilder(wt.branch, working_tree=wt, 
 
58
            builder = RioVersionInfoBuilder(wt.branch, working_tree=wt,
59
59
                                            **kwargs)
60
60
            builder.generate(sio)
61
61
            val = sio.getvalue()
88
88
 
89
89
        def regen(**kwargs):
90
90
            sio = StringIO()
91
 
            builder = RioVersionInfoBuilder(wt.branch, working_tree=wt, 
 
91
            builder = RioVersionInfoBuilder(wt.branch, working_tree=wt,
92
92
                                            **kwargs)
93
93
            builder.generate(sio)
94
94
            sio.seek(0)
150
150
 
151
151
        def regen(**kwargs):
152
152
            outf = open('test_version_information.py', 'wb')
153
 
            builder = PythonVersionInfoBuilder(wt.branch, working_tree=wt, 
 
153
            builder = PythonVersionInfoBuilder(wt.branch, working_tree=wt,
154
154
                                               **kwargs)
155
155
            builder.generate(outf)
156
156
            outf.close()
190
190
 
191
191
        tvi = regen(include_revision_history=True)
192
192
 
193
 
        rev_info = [(rev, message) for rev, message, timestamp, timezone 
194
 
                                   in tvi.revisions] 
 
193
        rev_info = [(rev, message) for rev, message, timestamp, timezone
 
194
                                   in tvi.revisions]
195
195
        self.assertEqual([('r1', 'a'), ('r2', 'b'), ('r3', 'a2')], rev_info)
196
196
 
197
197
        # a was modified, so it should show up modified again