Beispiel #1
0
 def test_lower_bound(self):
     low_val = b'-11'
     with self.assertRaises(UnacknowledgedOption):
         timeout_parser(low_val)
Beispiel #2
0
 def test_float_within_acceptable_range(self):
     val = b'20.5'
     self.assertEqual(timeout_parser(val), 20.5)
Beispiel #3
0
 def test_garbage_data(self):
     val = b'\x41'
     with self.assertRaises(ValueError):
         timeout_parser(val)
Beispiel #4
0
 def test_upper_bound(self):
     high_val = b'999'
     with self.assertRaises(UnacknowledgedOption):
         timeout_parser(high_val)
Beispiel #5
0
 def test_lower_bound(self):
     low_val = b'-11'
     with self.assertRaises(UnacknowledgedOption):
         timeout_parser(low_val)
Beispiel #6
0
 def test_garbage_data(self):
     val = b'\x41'
     with self.assertRaises(ValueError):
         timeout_parser(val)
Beispiel #7
0
 def test_float_within_acceptable_range(self):
     val = b'20.5'
     self.assertEqual(timeout_parser(val), 20.5)
Beispiel #8
0
 def test_upper_bound(self):
     high_val = b'999'
     with self.assertRaises(UnacknowledgedOption):
         timeout_parser(high_val)