예제 #1
0
 def test_number_range_1(self):
     try:
         ReDate.number_range_regexp(str(510), str(500))
     except ValueError:
         pass
     else:
         fail("expected a ValueError")
예제 #2
0
 def test_number_range_7(self):
     result = ReDate.number_range_regexp(str(180), str(390))
     self.assertEqual(result, '(1[8-9][0-9]|2[0-9]{2}|3([0-8][0-9]|90))')
예제 #3
0
 def test_number_range_6(self):
     result = ReDate.number_range_regexp(str(15), str(42))
     self.assertEqual(result, '(1[5-9]|[2-3][0-9]|4[0-2])')
예제 #4
0
 def test_number_range_5(self):
     result = ReDate.number_range_regexp(str(21), str(26))
     self.assertEqual(result, '2[1-6]')
예제 #5
0
 def test_number_range_4(self):
     result = ReDate.number_range_regexp(str(2), str(4))
     self.assertEqual(result, '[2-4]')
예제 #6
0
 def test_number_range_3(self):
     result = ReDate.number_range_regexp(str(2), str(2))
     self.assertEqual(result, '2')