def test_garbage_data(self): val = b'\x41' with self.assertRaises(ValueError): blksize_parser(val)
def test_upper_bound_capped(self): high_val = b'70000' self.assertEqual(blksize_parser(high_val, upper_bound=4096), 4096)
def test_int_within_acceptable_range(self): val = b'2048' self.assertEqual(blksize_parser(val), 2048)
def test_lower_bound(self): low_val = b'4' with self.assertRaises(UnacknowledgedOption): blksize_parser(low_val)
def test_garbage_data(self): val = b'\x41' with self.assertRaises(ValueError): blksize_parser(val)
def test_int_within_acceptable_range(self): val = b'2048' self.assertEqual(blksize_parser(val), 2048)
def test_upper_bound_capped(self): high_val = b'70000' self.assertEqual(blksize_parser(high_val, upper_bound=4096), 4096)
def test_lower_bound(self): low_val = b'4' with self.assertRaises(UnacknowledgedOption): blksize_parser(low_val)