Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_add_microsecond(self):
c = self.dt + Interval(microseconds=1)
self.assertEqual("dt+INTERVAL 1 MICROSECOND", str(c))
def test_add_value_complex_expressions(self):
c = self.dt + Interval(quarters=1) + Interval(weeks=1)
self.assertEqual("dt+INTERVAL 1 QUARTER+INTERVAL 1 WEEK", str(c))
def test_add_day_second(self):
c = self.dt + Interval(days=1, seconds=1)
self.assertEqual("dt+INTERVAL 1 0:0:1 DAY_SECOND", str(c))
def test_add_hour_second(self):
c = self.dt + Interval(hours=1, seconds=1)
self.assertEqual("dt+INTERVAL 1:0:1 HOUR_SECOND", str(c))
def test_add_day_minute(self):
c = self.dt + Interval(days=1, minutes=1)
self.assertEqual("dt+INTERVAL 1 0:1 DAY_MINUTE", str(c))
def test_add_day(self):
c = self.dt + Interval(days=1)
self.assertEqual("dt+INTERVAL 1 DAY", str(c))
def test_add_day_microsecond(self):
c = self.dt + Interval(days=1, microseconds=1)
self.assertEqual("dt+INTERVAL 1 0:0:0.1 DAY_MICROSECOND", str(c))
def test_add_second(self):
c = self.dt + Interval(seconds=1)
self.assertEqual("dt+INTERVAL 1 SECOND", str(c))
def test_add_day_hour(self):
c = self.dt + Interval(days=1, hours=1)
self.assertEqual("dt+INTERVAL 1 1 DAY_HOUR", str(c))
def test_add_quarter(self):
c = self.dt + Interval(quarters=1)
self.assertEqual("dt+INTERVAL 1 QUARTER", str(c))