/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transport.py

  • Committer: v.ladeuil+lp at free
  • Date: 2006-11-30 14:55:34 UTC
  • mto: This revision was merged to the branch mainline in revision 2161.
  • Revision ID: v.ladeuil+lp@free.fr-20061130145534-6y3j6mxxutplpkyx
Make the tests windows compatible.

* bzrlib/tests/test_transport.py:
(ChrootDecoratorTransportTest): Use a memory transport isntead of
a file one, but this stills seems a bit of a workaround for
windows.

Show diffs side-by-side

added added

removed removed

Lines of Context:
298
298
        self.assertEqual('memory:///path/', transport.chroot_url)
299
299
 
300
300
    def test_append_file(self):
301
 
        transport = get_transport('chroot+file:///foo/bar')
 
301
        transport = get_transport('chroot+memory:///foo/bar')
302
302
        self.assertRaises(PathNotChild, transport.append_file, '/foo', None)
303
303
 
304
304
    def test_append_bytes(self):
305
 
        transport = get_transport('chroot+file:///foo/bar')
 
305
        transport = get_transport('chroot+memory:///foo/bar')
306
306
        self.assertRaises(PathNotChild, transport.append_bytes, '/foo', 'bytes')
307
307
 
308
308
    def test_clone(self):
309
 
        transport = get_transport('chroot+file:///foo/bar')
 
309
        transport = get_transport('chroot+memory:///foo/bar')
310
310
        self.assertRaises(PathNotChild, transport.clone, '/foo')
311
311
 
312
312
    def test_delete(self):
313
 
        transport = get_transport('chroot+file:///foo/bar')
 
313
        transport = get_transport('chroot+memory:///foo/bar')
314
314
        self.assertRaises(PathNotChild, transport.delete, '/foo')
315
315
 
316
316
    def test_delete_tree(self):
317
 
        transport = get_transport('chroot+file:///foo/bar')
 
317
        transport = get_transport('chroot+memory:///foo/bar')
318
318
        self.assertRaises(PathNotChild, transport.delete_tree, '/foo')
319
319
 
320
320
    def test_get(self):
321
 
        transport = get_transport('chroot+file:///foo/bar')
 
321
        transport = get_transport('chroot+memory:///foo/bar')
322
322
        self.assertRaises(PathNotChild, transport.get, '/foo')
323
323
 
324
324
    def test_get_bytes(self):
325
 
        transport = get_transport('chroot+file:///foo/bar')
 
325
        transport = get_transport('chroot+memory:///foo/bar')
326
326
        self.assertRaises(PathNotChild, transport.get_bytes, '/foo')
327
327
 
328
328
    def test_has(self):
329
 
        transport = get_transport('chroot+file:///foo/bar')
 
329
        transport = get_transport('chroot+memory:///foo/bar')
330
330
        self.assertRaises(PathNotChild, transport.has, '/foo')
331
331
 
332
332
    def test_list_dir(self):
333
 
        transport = get_transport('chroot+file:///foo/bar')
 
333
        transport = get_transport('chroot+memory:///foo/bar')
334
334
        self.assertRaises(PathNotChild, transport.list_dir, '/foo')
335
335
 
336
336
    def test_lock_read(self):
337
 
        transport = get_transport('chroot+file:///foo/bar')
 
337
        transport = get_transport('chroot+memory:///foo/bar')
338
338
        self.assertRaises(PathNotChild, transport.lock_read, '/foo')
339
339
 
340
340
    def test_lock_write(self):
341
 
        transport = get_transport('chroot+file:///foo/bar')
 
341
        transport = get_transport('chroot+memory:///foo/bar')
342
342
        self.assertRaises(PathNotChild, transport.lock_write, '/foo')
343
343
 
344
344
    def test_mkdir(self):
345
 
        transport = get_transport('chroot+file:///foo/bar')
 
345
        transport = get_transport('chroot+memory:///foo/bar')
346
346
        self.assertRaises(PathNotChild, transport.mkdir, '/foo')
347
347
 
348
348
    def test_put_bytes(self):
349
 
        transport = get_transport('chroot+file:///foo/bar')
 
349
        transport = get_transport('chroot+memory:///foo/bar')
350
350
        self.assertRaises(PathNotChild, transport.put_bytes, '/foo', 'bytes')
351
351
 
352
352
    def test_put_file(self):
353
 
        transport = get_transport('chroot+file:///foo/bar')
 
353
        transport = get_transport('chroot+memory:///foo/bar')
354
354
        self.assertRaises(PathNotChild, transport.put_file, '/foo', None)
355
355
 
356
356
    def test_rename(self):
357
 
        transport = get_transport('chroot+file:///foo/bar')
 
357
        transport = get_transport('chroot+memory:///foo/bar')
358
358
        self.assertRaises(PathNotChild, transport.rename, '/aaa', 'bbb')
359
359
        self.assertRaises(PathNotChild, transport.rename, 'ccc', '/d')
360
360
 
361
361
    def test_rmdir(self):
362
 
        transport = get_transport('chroot+file:///foo/bar')
 
362
        transport = get_transport('chroot+memory:///foo/bar')
363
363
        self.assertRaises(PathNotChild, transport.rmdir, '/foo')
364
364
 
365
365
    def test_stat(self):
366
 
        transport = get_transport('chroot+file:///foo/bar')
 
366
        transport = get_transport('chroot+memory:///foo/bar')
367
367
        self.assertRaises(PathNotChild, transport.stat, '/foo')
368
368
 
369
 
        
 
369
 
370
370
class ReadonlyDecoratorTransportTest(TestCase):
371
371
    """Readonly decoration specific tests."""
372
372