MCPcopy Create free account
hub / github.com/asg017/sqlite-loadable-rs / test_funcs

Method test_funcs

examples/test-examples.py:37–44  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

35
36class TestExamples(unittest.TestCase):
37 def test_funcs(self):
38 hello = lambda name: db.execute("select hello(?)", [name]).fetchone()[0]
39 self.assertEqual(hello('world'), "hello, world!")
40 self.assertEqual(hello(None), "hello, !")
41 self.assertEqual(hello(1234), "hello, 1234!")
42 self.assertEqual(hello("null: x\0x"), "hello, null: x\0x!")
43 #hello("x" * (2_147_483_647 - len("hello, !") - 20) )
44 #hello("x" * (200) )
45
46if __name__ == '__main__':
47 unittest.main()

Callers

nothing calls this directly

Calls 2

executeMethod · 0.80
helloFunction · 0.70

Tested by

no test coverage detected