Test further hour precision intervals
@@ -59,8 +59,20 @@ class DateIntervalTest(unittest.TestCase):
self.assertExcludes('1999-12..2000-02', '2000-03-01T00:00:00')
def test_hour_precision_intervals(self):
+ self.assertExcludes('2000-01-01T12..2000-01-01T13',
+ '2000-01-01T11:59:59')
+ self.assertContains('2000-01-01T12..2000-01-01T13',
+ '2000-01-01T12:00:00')
self.assertContains('2000-01-01T12..2000-01-01T13',
'2000-01-01T12:30:00')
+ self.assertContains('2000-01-01T12..2000-01-01T13',
+ '2000-01-01T13:30:00')
+ self.assertContains('2000-01-01T12..2000-01-01T13',
+ '2000-01-01T13:59:59')
+ self.assertExcludes('2000-01-01T12..2000-01-01T13',
+ '2000-01-01T14:00:00')
+ self.assertExcludes('2000-01-01T12..2000-01-01T13',
+ '2000-01-01T14:30:00')
def test_unbounded_endpoints(self):
self.assertContains('..', date=datetime.max)
