コード例 #1
0
    def test_print_with_filter(self):
        statement = qc.EvalPrint(qc.EvalFrom(qc.EvalEqual(qe.YearEntryColumn(),
                                                          qc.EvalConstant(2012)),
                                             None, None, None))
        oss = io.StringIO()
        qx.execute_print(statement, self.entries, self.options_map, oss)

        self.assertEqualEntries("""

          2012-02-02 * "Dinner with Dos"
            Assets:Bank:Checking                                                   102.00 USD
            Expenses:Restaurant                                                   -102.00 USD

        """, oss.getvalue())
コード例 #2
0
 def test_print_from(self):
     self.assertCompile(
         qc.EvalPrint(
             qc.EvalFrom(
                 qc.EvalEqual(qe.YearEntryColumn(), qc.EvalConstant(2014)),
                 None, None, None)), "PRINT FROM year = 2014;")