~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_revert.py

  • Committer: Wouter van Heyst
  • Date: 2011-05-18 10:03:10 UTC
  • mto: This revision was merged to the branch mainline in revision 5893.
  • Revision ID: larstiq@larstiq.dyndns.org-20110518100310-7i5uj6nfcdcw34tz
Fix remaining failing blackbox tests under pypy due to refcount/flush interaction.

Show diffs side-by-side

added added

removed removed

Lines of Context:
120
120
    def test_revert(self):
121
121
        self.run_bzr('init')
122
122
 
123
 
        file('hello', 'wt').write('foo')
 
123
        with file('hello', 'wt') as f: f.write('foo')
124
124
        self.run_bzr('add hello')
125
125
        self.run_bzr('commit -m setup hello')
126
126
 
127
 
        file('goodbye', 'wt').write('baz')
 
127
        with file('goodbye', 'wt') as f: f.write('baz')
128
128
        self.run_bzr('add goodbye')
129
129
        self.run_bzr('commit -m setup goodbye')
130
130
 
131
 
        file('hello', 'wt').write('bar')
132
 
        file('goodbye', 'wt').write('qux')
 
131
        with file('hello', 'wt') as f: f.write('bar')
 
132
        with file('goodbye', 'wt') as f: f.write('qux')
133
133
        self.run_bzr('revert hello')
134
134
        self.check_file_contents('hello', 'foo')
135
135
        self.check_file_contents('goodbye', 'qux')
157
157
        else:
158
158
            self.log("skipping revert symlink tests")
159
159
 
160
 
        file('hello', 'wt').write('xyz')
 
160
        with file('hello', 'wt') as f: f.write('xyz')
161
161
        self.run_bzr('commit -m xyz hello')
162
162
        self.run_bzr('revert -r 1 hello')
163
163
        self.check_file_contents('hello', 'foo')