~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/testtransport.py

  • Committer: John Arbash Meinel
  • Date: 2005-11-10 01:31:41 UTC
  • mto: This revision was merged to the branch mainline in revision 1508.
  • Revision ID: john@arbash-meinel.com-20051110013141-f6cc853a1d85a9a9
Added a test that copy_to raises NoSuchFile when a directory is missing (not IOError)

Show diffs side-by-side

added added

removed removed

Lines of Context:
295
295
            self.assertEquals(open(f).read(),
296
296
                    open(os.path.join(dtmp_base, f)).read())
297
297
 
 
298
        # Test that copying into a missing directory raises
 
299
        # NoSuchFile
 
300
        os.mkdir('e')
 
301
        open('e/f', 'wb').write('contents of e')
 
302
        self.assertRaises(NoSuchFile, t.copy_to, ['e/f'], local_t)
 
303
 
 
304
        os.mkdir(os.path.join(dtmp_base, 'e'))
 
305
        t.copy_to(['e/f'], local_t)
 
306
 
298
307
        del dtmp, dtmp_base, local_t
299
308
 
300
309
        dtmp = tempfile.mkdtemp(dir='.', prefix='test-transport-')