예제 #1
0
 def test_from_close_dated(self):
     self.assertParse(qSelect(self.targets,
                              qp.From(self.expr, None, datetime.date(2014, 10, 18),
                                      None)),
                      "SELECT a, b FROM d = (max(e) and 17) CLOSE ON 2014-10-18;")
예제 #2
0
 def test_from_close_default(self):
     self.assertParse(qSelect(self.targets, qp.From(self.expr, None, True, None)),
                      "SELECT a, b FROM d = (max(e) and 17) CLOSE;")
예제 #3
0
 def test_from_open_default(self):
     self.assertParse(qSelect(self.targets, qp.From(self.expr,
                                                    datetime.date(2014, 1, 1),
                                                    None, None)),
                      "SELECT a, b FROM d = (max(e) and 17) OPEN ON 2014-01-01;")
예제 #4
0
 def test_from(self):
     self.assertParse(qSelect(self.targets, qp.From(self.expr, None, None, None)),
                      "SELECT a, b FROM d = (max(e) and 17);")
예제 #5
0
 def test_from_close_no_expr_dated(self):
     self.assertParse(
         qSelect(self.targets,
                 qp.From(None, None, datetime.date(2014, 10, 18), None)),
         "SELECT a, b FROM CLOSE ON 2014-10-18;")
예제 #6
0
 def test_from_close_no_expr(self):
     self.assertParse(
         qSelect(self.targets, qp.From(None, None, True, None)),
         "SELECT a, b FROM CLOSE;")