def test_invalidRanges(self):
    '\n        L{File._parseRangeHeader} raises L{ValueError} when passed\n        syntactically invalid byte ranges.\n        '
    f = self.resource._parseRangeHeader
    self.assertRaises(ValueError, f, b'bytes')
    self.assertRaises(ValueError, f, b'unknown=1-2')
    self.assertRaises(ValueError, f, b'bytes=3')
    self.assertRaises(ValueError, f, b'bytes=-')
    self.assertRaises(ValueError, f, b'bytes=foo-')
    self.assertRaises(ValueError, f, b'bytes=-foo')
    self.assertRaises(ValueError, f, b'bytes=5-4')
L{File._parseRangeHeader} raises L{ValueError} when passed
syntactically invalid byte ranges.
def test_invalidRanges(self):
    '\n        L{File._parseRangeHeader} raises L{ValueError} when passed\n        syntactically invalid byte ranges.\n        '
    f = self.resource._parseRangeHeader
    self.assertRaises(ValueError, f, b'bytes')
    self.assertRaises(ValueError, f, b'unknown=1-2')
    self.assertRaises(ValueError, f, b'bytes=3')
    self.assertRaises(ValueError, f, b'bytes=-')
    self.assertRaises(ValueError, f, b'bytes=foo-')
    self.assertRaises(ValueError, f, b'bytes=-foo')
    self.assertRaises(ValueError, f, b'bytes=5-4')