          self.assertEqual(parse_datetime('2012-04-23T10:20:30.400-02'),
              datetime(2012, 4, 23, 10, 20, 30, 400000, get_fixed_timezone(-120)))
          # Invalid inputs
          self.assertEqual(parse_datetime('20120423091500'), None)
          self.assertRaises(ValueError, parse_datetime, '2012-04-56T09:15:90')
  
  
  class DurationParseTests(unittest.TestCase):
  
      def test_parse_python_format(self):
 
</s> remove         self.assertRaises(ValueError, parse_time, '09:15:90')
 </s> add         with self.assertRaises(ValueError):
            parse_time('09:15:90') </s> remove         self.assertRaises(ValueError, parse_date, '2012-04-56')
 </s> add         with self.assertRaises(ValueError):
            parse_date('2012-04-56') </s> remove         self.assertRaises(ValidationError, f.clean, None, None)
 </s> add         with self.assertRaises(ValidationError):
            f.clean(None, None) </s> remove         self.assertRaises(EmptyPage, self.check_indexes, ([], 4, 0, False), 1, None)
        self.assertRaises(EmptyPage, self.check_indexes, ([], 4, 1, False), 1, None)
        self.assertRaises(EmptyPage, self.check_indexes, ([], 4, 2, False), 1, None)
 </s> add         with self.assertRaises(EmptyPage):
            self.check_indexes(([], 4, 0, False), 1, None)
        with self.assertRaises(EmptyPage):
            self.check_indexes(([], 4, 1, False), 1, None)
        with self.assertRaises(EmptyPage):
            self.check_indexes(([], 4, 2, False), 1, None) </s> remove         self.assertRaises(ValidationError, f.clean, None, None)
 </s> add         with self.assertRaises(ValidationError):
            f.clean(None, None)
        with self.assertRaises(ValueError):
            parse_datetime('2012-04-56T09:15:90')
          self.assertEqual(parse_datetime('2012-04-23T10:20:30.400-02'),
              datetime(2012, 4, 23, 10, 20, 30, 400000, get_fixed_timezone(-120)))
          # Invalid inputs
          self.assertEqual(parse_datetime('20120423091500'), None)
        with self.assertRaises(ValueError):
            parse_datetime('2012-04-56T09:15:90')
  
  
  class DurationParseTests(unittest.TestCase):
  
      def test_parse_python_format(self):
keep keep keep keep replace keep keep keep keep keep
 Refs #26022 -- Used context manager version of assertRaises in tests. 
tests/utils_tests/test_dateparse.py