tests: der Mech kann springen
This commit is contained in:
+10
-14
@@ -92,7 +92,7 @@ class TestMechBau(AbstractTestMech):
|
||||
|
||||
def _test_for_head_items(self, area: Area):
|
||||
self.assertEqual(6, len(area.items))
|
||||
self.__test_for_items(area, [
|
||||
self._test_for_items(area, [
|
||||
((1, 1), ItemTypes.SUSTAINMENT),
|
||||
((1, 2), ItemTypes.SENSORS),
|
||||
((1, 3), ItemTypes.COCKPIT),
|
||||
@@ -104,7 +104,7 @@ class TestMechBau(AbstractTestMech):
|
||||
|
||||
def _test_for_middle_torso_items(self, area: Area):
|
||||
self.assertEqual(12, len(area.items))
|
||||
self.__test_for_items(area, [
|
||||
self._test_for_items(area, [
|
||||
((1, 1), ItemTypes.REAKTOR),
|
||||
((1, 2), ItemTypes.REAKTOR),
|
||||
((1, 3), ItemTypes.REAKTOR),
|
||||
@@ -113,8 +113,8 @@ class TestMechBau(AbstractTestMech):
|
||||
((1, 6), ItemTypes.GYROSKOPE),
|
||||
|
||||
((2, 1), ItemTypes.GYROSKOPE),
|
||||
((2, 2), ItemTypes.GYROSKOPE),
|
||||
((2, 3), ItemTypes.GYROSKOPE),
|
||||
((2, 2), ItemTypes.REAKTOR),
|
||||
((2, 3), ItemTypes.REAKTOR),
|
||||
((2, 4), ItemTypes.REAKTOR),
|
||||
]
|
||||
)
|
||||
@@ -124,7 +124,7 @@ class TestMechBau(AbstractTestMech):
|
||||
def _test_for_side_torso_items(self, area: Area):
|
||||
self.assertEqual(12, len(area.items))
|
||||
for (group, key) in ((group, key + 1) for group in [1, 2] for key in range(6)):
|
||||
self.assertIsNone(area.items[key])
|
||||
self.assertIsNone(area.items[(group, key)])
|
||||
|
||||
def _test_for_arm_items(self, area: Area):
|
||||
self.assertEqual(12, len(area.items))
|
||||
@@ -139,7 +139,7 @@ class TestMechBau(AbstractTestMech):
|
||||
pass
|
||||
|
||||
def _test_for_arm_leg_items(self, area: Area):
|
||||
self.__test_for_items(area, [
|
||||
self._test_for_items(area, [
|
||||
((1, 1), ItemTypes.JOINT),
|
||||
((1, 2), ItemTypes.ACTIVATOR),
|
||||
((1, 3), ItemTypes.ACTIVATOR),
|
||||
@@ -150,11 +150,6 @@ class TestMechBau(AbstractTestMech):
|
||||
self.assertIsNone(area.items[(1, 6)])
|
||||
pass
|
||||
|
||||
def __test_for_items(self, area: Area, should_list: list):
|
||||
for (key, item_type) in should_list:
|
||||
self.assertIsInstance(area.items[key], Item)
|
||||
self.assertEqual(area.items[key].type, item_type)
|
||||
|
||||
|
||||
class TestMechAmor(AbstractTestMechAmor):
|
||||
|
||||
@@ -180,8 +175,9 @@ class TestMechWeightWatch(AbstractTestMechAmor):
|
||||
Interne-Struktur | 5.5
|
||||
Cockpit | 3.0
|
||||
Panzerung | 9.5
|
||||
Sprungdüsen | 2.5
|
||||
------------------------------------
|
||||
| 36.5
|
||||
| 39.0
|
||||
'''
|
||||
self.assertEqual(36.5, watcher.actual_weight)
|
||||
self.assertEqual(18.5, watcher.rest_weight)
|
||||
self.assertEqual(39.0, watcher.actual_weight)
|
||||
self.assertEqual(16.0, watcher.rest_weight)
|
||||
|
||||
Reference in New Issue
Block a user