MCPcopy Index your code
hub / github.com/kivy/python-for-android / test_prepare_dist_dir

Method test_prepare_dist_dir

tests/test_bootstrap.py:256–264  ·  view source on GitHub ↗

A test which will initialize a bootstrap and will check if the method :meth:`~pythonforandroid.bootstrap.Bootstrap.prepare_dist_dir` successfully calls once the method `endure_dir`

(self, mock_ensure_dir)

Source from the content-addressed store, hash-verified

254
255 @mock.patch("pythonforandroid.bootstrap.ensure_dir")
256 def test_prepare_dist_dir(self, mock_ensure_dir):
257 """A test which will initialize a bootstrap and will check if the
258 method :meth:`~pythonforandroid.bootstrap.Bootstrap.prepare_dist_dir`
259 successfully calls once the method `endure_dir`
260 """
261 bs = Bootstrap().get_bootstrap("sdl2", self.ctx)
262
263 bs.prepare_dist_dir()
264 mock_ensure_dir.assert_called_once()
265
266 @mock.patch("pythonforandroid.bootstrap.open", create=True)
267 @mock.patch("pythonforandroid.util.chdir")

Callers

nothing calls this directly

Calls 3

BootstrapClass · 0.90
get_bootstrapMethod · 0.80
prepare_dist_dirMethod · 0.80

Tested by

no test coverage detected