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

Method test_delete

tests/test_distribution.py:95–105  ·  view source on GitHub ↗

Test that method :meth:`~pythonforandroid.distribution.Distribution.delete` is called once with the proper arguments.

(self, mock_rmdir)

Source from the content-addressed store, hash-verified

93
94 @mock.patch("pythonforandroid.distribution.rmdir")
95 def test_delete(self, mock_rmdir):
96 """Test that method
97 :meth:`~pythonforandroid.distribution.Distribution.delete` is
98 called once with the proper arguments."""
99 self.setUp_distribution_with_bootstrap(
100 Bootstrap().get_bootstrap("sdl2", self.ctx)
101 )
102 self.ctx.bootstrap.distribution.delete()
103 mock_rmdir.assert_called_once_with(
104 self.ctx.bootstrap.distribution.dist_dir
105 )
106
107 @mock.patch("pythonforandroid.distribution.exists")
108 def test_get_distribution_no_name(self, mock_exists):

Callers

nothing calls this directly

Calls 4

BootstrapClass · 0.90
get_bootstrapMethod · 0.80
deleteMethod · 0.80

Tested by

no test coverage detected