(self)
| 223 | self.assertEqual(0, binding.act) |
| 224 | |
| 225 | def test_caching(self): |
| 226 | all_joints = self.model.find_all('joint') |
| 227 | |
| 228 | original = self.physics.bind(all_joints) |
| 229 | cached = self.physics.bind(all_joints) |
| 230 | self.assertIs(cached, original) |
| 231 | |
| 232 | different_order = self.physics.bind(all_joints[::-1]) |
| 233 | self.assertIsNot(different_order, original) |
| 234 | |
| 235 | # Reloading the `Physics` instance should clear the cache. |
| 236 | self.physics.reload_from_xml_string( |
| 237 | self.model.to_xml_string(), assets=self.model.get_assets()) |
| 238 | after_reload = self.physics.bind(all_joints) |
| 239 | self.assertIsNot(after_reload, original) |
| 240 | |
| 241 | def test_exceptions(self): |
| 242 | joint = self.model.find_all('joint')[0] |
nothing calls this directly
no test coverage detected