MCPcopy Create free account
hub / github.com/bottlepy/bottle / test_close

Method test_close

test/test_plugins.py:212–221  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

210 self.assertEqual(getattr(plugin, 'app', None), self.app)
211
212 def test_close(self):
213 class Plugin(object):
214 def __call__(self, func): return func
215 def close(self): self.closed = True
216 plugin = self.app.install(Plugin())
217 plugin2 = self.app.install(Plugin())
218 self.app.uninstall(plugin)
219 self.assertTrue(getattr(plugin, 'closed', False))
220 self.app.close()
221 self.assertTrue(getattr(plugin2, 'closed', False))

Callers

nothing calls this directly

Calls 4

PluginClass · 0.85
installMethod · 0.80
uninstallMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected