MCPcopy Create free account
hub / github.com/kivy/python-for-android / test_properties

Method test_properties

tests/test_distribution.py:65–77  ·  view source on GitHub ↗

Test that some attributes has the expected result (for now, we check that `__repr__` and `__str__` return the proper values

(self)

Source from the content-addressed store, hash-verified

63 self.ctx.bootstrap = None
64
65 def test_properties(self):
66 """Test that some attributes has the expected result (for now, we check
67 that `__repr__` and `__str__` return the proper values"""
68 self.setUp_distribution_with_bootstrap(
69 Bootstrap().get_bootstrap("sdl2", self.ctx)
70 )
71 distribution = self.ctx.bootstrap.distribution
72 self.assertEqual(self.ctx, distribution.ctx)
73 expected_repr = (
74 "<Distribution: name test_prj with recipes (python3, kivy)>"
75 )
76 self.assertEqual(distribution.__str__(), expected_repr)
77 self.assertEqual(distribution.__repr__(), expected_repr)
78
79 @mock.patch("pythonforandroid.distribution.exists")
80 def test_folder_exist(self, mock_exists):

Callers

nothing calls this directly

Calls 5

BootstrapClass · 0.90
get_bootstrapMethod · 0.80
__str__Method · 0.45
__repr__Method · 0.45

Tested by

no test coverage detected