~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_sftp_transport.py

(gz) Close files more promptly in tests to avoid issues on pypy (Wouter van
 Heyst)

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
        l.unlock()
82
82
        self.assertFalse(lexists('bogus.write-lock'))
83
83
 
84
 
        open('something.write-lock', 'wb').write('fake lock\n')
 
84
        with open('something.write-lock', 'wb') as f: f.write('fake lock\n')
85
85
        self.assertRaises(LockError, t.lock_write, 'something')
86
86
        os.remove('something.write-lock')
87
87
 
201
201
 
202
202
        self.assertEquals(b2.last_revision(), 'a1')
203
203
 
204
 
        open('a/foo', 'wt').write('something new in foo\n')
 
204
        with open('a/foo', 'wt') as f: f.write('something new in foo\n')
205
205
        t.commit('new', rev_id='a2')
206
206
        b2.pull(b)
207
207