~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transport_implementations.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-03-09 06:39:13 UTC
  • mfrom: (1596.2.6 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20060309063913-6d8ce700706d0802
Merge knit performance stage 1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
892
892
        # TODO make this consistent on all platforms:
893
893
        # self.assertRaises(LockError, transport.lock_read, 'lock')
894
894
        lock.unlock()
 
895
 
 
896
    def test_readv(self):
 
897
        transport = self.get_transport()
 
898
        if transport.is_readonly():
 
899
            file('a', 'w').write('0123456789')
 
900
        else:
 
901
            transport.put('a', StringIO('01234567890'))
 
902
 
 
903
        d = list(transport.readv('a', ((0, 1), (1, 1), (3, 2), (9, 1))))
 
904
        self.assertEqual(d[0], (0, '0'))
 
905
        self.assertEqual(d[1], (1, '1'))
 
906
        self.assertEqual(d[2], (3, '34'))
 
907
        self.assertEqual(d[3], (9, '9'))