~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_http.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-12-13 05:52:27 UTC
  • mfrom: (2180.1.2 revert-missing)
  • Revision ID: pqm@pqm.ubuntu.com-20061213055227-6159e82aef3f15a6
Handle short http reads better.  (Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
566
566
        self.assertEqual(l[2], (0, '0'))
567
567
        self.assertEqual(l[3], (3, '34'))
568
568
 
569
 
    def test_readv_short_read(self):
 
569
    def test_readv_invalid_ranges(self):
570
570
        server = self.get_readonly_server()
571
571
        t = self._transport(server.get_url())
572
572
 
573
573
        # This is intentionally reading off the end of the file
574
574
        # since we are sure that it cannot get there
575
 
        self.assertListRaises((errors.ShortReadvError, AssertionError),
 
575
        self.assertListRaises((errors.InvalidRange, errors.ShortReadvError,),
576
576
                              t.readv, 'a', [(1,1), (8,10)])
577
577
 
578
578
        # This is trying to seek past the end of the file, it should
579
579
        # also raise a special error
580
 
        self.assertListRaises(errors.ShortReadvError,
 
580
        self.assertListRaises((errors.InvalidRange, errors.ShortReadvError,),
581
581
                              t.readv, 'a', [(12,2)])
582
582
 
583
583