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;")
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;")
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;")
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);")
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;")
def test_from_close_no_expr(self): self.assertParse( qSelect(self.targets, qp.From(None, None, True, None)), "SELECT a, b FROM CLOSE;")