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

Method test_attributes

tests/test_bootstrap.py:74–92  ·  view source on GitHub ↗

A test which will initialize a bootstrap and will check if the values are the expected.

(self)

Source from the content-addressed store, hash-verified

72 """
73
74 def test_attributes(self):
75 """A test which will initialize a bootstrap and will check if the
76 values are the expected.
77 """
78 bs = Bootstrap().get_bootstrap("sdl2", self.ctx)
79 self.assertEqual(bs.name, "sdl2")
80 self.assertEqual(bs.jni_dir, "sdl2/jni")
81 self.assertEqual(bs.get_build_dir_name(), "sdl2")
82
83 # bs.dist_dir should raise an error if there is no distribution to query
84 bs.distribution = None
85 with self.assertRaises(BuildInterruptingException):
86 bs.dist_dir
87
88 # test dist_dir success
89 self.setUp_distribution_with_bootstrap(bs)
90 expected_folder_name = 'test_prj'
91 self.assertTrue(
92 bs.dist_dir.endswith(f"dists/{expected_folder_name}"))
93
94 def test_build_dist_dirs(self):
95 """A test which will initialize a bootstrap and will check if the

Callers

nothing calls this directly

Calls 4

BootstrapClass · 0.90
get_bootstrapMethod · 0.80
get_build_dir_nameMethod · 0.80

Tested by

no test coverage detected