(self)
| 621 | |
| 622 | class AggregateTests(unittest.TestCase): |
| 623 | def setUp(self): |
| 624 | self.con = sqlite.connect(":memory:") |
| 625 | cur = self.con.cursor() |
| 626 | cur.execute(""" |
| 627 | create table test( |
| 628 | t text, |
| 629 | i integer, |
| 630 | f float, |
| 631 | n, |
| 632 | b blob |
| 633 | ) |
| 634 | """) |
| 635 | cur.execute("insert into test(t, i, f, n, b) values (?, ?, ?, ?, ?)", |
| 636 | ("foo", 5, 3.14, None, memoryview(b"blob"),)) |
| 637 | cur.close() |
| 638 | |
| 639 | self.con.create_aggregate("nostep", 1, AggrNoStep) |
| 640 | self.con.create_aggregate("nofinalize", 1, AggrNoFinalize) |
| 641 | self.con.create_aggregate("excInit", 1, AggrExceptionInInit) |
| 642 | self.con.create_aggregate("excStep", 1, AggrExceptionInStep) |
| 643 | self.con.create_aggregate("excFinalize", 1, AggrExceptionInFinalize) |
| 644 | self.con.create_aggregate("checkType", 2, AggrCheckType) |
| 645 | self.con.create_aggregate("checkTypes", -1, AggrCheckTypes) |
| 646 | self.con.create_aggregate("mysum", 1, AggrSum) |
| 647 | self.con.create_aggregate("aggtxt", 1, AggrText) |
| 648 | |
| 649 | def tearDown(self): |
| 650 | self.con.close() |
nothing calls this directly
no test coverage detected