~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_sftp_transport.py

  • Committer: Martin Packman
  • Date: 2011-12-05 09:49:23 UTC
  • mto: This revision was merged to the branch mainline in revision 6341.
  • Revision ID: martin.packman@canonical.com-20111205094923-vfsozmhu4sfyh3eu
Close the devnull file on test cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
295
295
 
296
296
    def test_bad_connection_ssh(self):
297
297
        """None => auto-detect vendor"""
298
 
        self.set_vendor(None, file(os.devnull, "wb"))
 
298
        f = file(os.devnull, "wb")
 
299
        self.addCleanup(f.close)
 
300
        self.set_vendor(None, f)
299
301
        t = _mod_transport.get_transport_from_url(self.bogus_url)
300
302
        try:
301
303
            t.ensure_base()