MCPcopy Index your code
hub / github.com/piccolo-orm/piccolo / _create_pool

Method _create_pool

tests/engine/test_pool.py:95–115  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

93@sqlite_only
94class TestConnectionPoolWarning(TestCase):
95 async def _create_pool(self):
96 sqlite_file = os.path.join(tempfile.gettempdir(), "engine.sqlite")
97 engine = SQLiteEngine(path=sqlite_file)
98
99 with patch("piccolo.engine.base.colored_warning") as colored_warning:
100 await engine.start_connection_pool()
101 await engine.close_connection_pool()
102
103 self.assertEqual(
104 colored_warning.call_args_list,
105 [
106 call(
107 "Connection pooling is not supported for sqlite.",
108 stacklevel=3,
109 ),
110 call(
111 "Connection pooling is not supported for sqlite.",
112 stacklevel=3,
113 ),
114 ],
115 )
116
117 def test_warnings(self):
118 """

Callers 1

test_warningsMethod · 0.95

Calls 4

SQLiteEngineClass · 0.90
assertEqualMethod · 0.80
start_connection_poolMethod · 0.45
close_connection_poolMethod · 0.45

Tested by

no test coverage detected