comparison gamelib/tests/test_scene_interactions_cryo.py @ 355:bfb6c682b4fb

Updated walkthrough test as far as completed environmental puzzle.
author Jeremy Thurgood <firxen@gmail.com>
date Sat, 28 Aug 2010 16:34:35 +0200
parents ca0c2875ad8f
children fdf3a6dd476b
comparison
equal deleted inserted replaced
354:09efb8b7c132 355:bfb6c682b4fb
89 89
90 def test_pipes_unchopped_hand(self): 90 def test_pipes_unchopped_hand(self):
91 "Touch the unchopped cryopipes with the hand. No change." 91 "Touch the unchopped cryopipes with the hand. No change."
92 92
93 self.assert_game_data('fixed', True, 'cryo.pipe.left') 93 self.assert_game_data('fixed', True, 'cryo.pipe.left')
94 self.assert_game_data('fixed', True, 'cryo.pipe.right') 94 self.assert_game_data('fixed', True, 'cryo.pipe.right.top')
95 self.assert_game_data('fixed', True, 'cryo.pipe.right.bottom')
95 96
96 self.assertNotEquals(None, self.interact_thing('cryo.pipe.left')) 97 self.assertNotEquals(None, self.interact_thing('cryo.pipe.left'))
97 self.assertNotEquals(None, self.interact_thing('cryo.pipe.right')) 98 self.assertNotEquals(None, self.interact_thing('cryo.pipe.right.top'))
99 self.assertNotEquals(None, self.interact_thing('cryo.pipe.right.bottom'))
98 100
99 self.assert_game_data('fixed', True, 'cryo.pipe.left') 101 self.assert_game_data('fixed', True, 'cryo.pipe.left')
100 self.assert_game_data('fixed', True, 'cryo.pipe.right') 102 self.assert_game_data('fixed', True, 'cryo.pipe.right.top')
103 self.assert_game_data('fixed', True, 'cryo.pipe.right.bottom')
101 104
102 def test_pipes_chopped_hand(self): 105 def test_pipes_chopped_hand(self):
103 "Touch the chopped cryopipes with the hand. No change." 106 "Touch the chopped cryopipes with the hand. No change."
104 107
105 self.set_game_data('fixed', False, 'cryo.pipe.left') 108 self.set_game_data('fixed', False, 'cryo.pipe.left')
106 self.set_game_data('fixed', False, 'cryo.pipe.right') 109 self.set_game_data('fixed', False, 'cryo.pipe.right.top')
110 self.set_game_data('fixed', False, 'cryo.pipe.right.bottom')
107 111
108 self.assertEquals(None, self.interact_thing('cryo.pipe.left')) 112 self.assertEquals(None, self.interact_thing('cryo.pipe.left'))
109 self.assertEquals(None, self.interact_thing('cryo.pipe.right')) 113 self.assertEquals(None, self.interact_thing('cryo.pipe.right.top'))
114 self.assertEquals(None, self.interact_thing('cryo.pipe.right.bottom'))
110 115
111 self.assert_game_data('fixed', False, 'cryo.pipe.left') 116 self.assert_game_data('fixed', False, 'cryo.pipe.left')
112 self.assert_game_data('fixed', False, 'cryo.pipe.right') 117 self.assert_game_data('fixed', False, 'cryo.pipe.right.top')
118 self.assert_game_data('fixed', False, 'cryo.pipe.right.bottom')
113 119
114 def test_pipes_unchopped_machete(self): 120 def test_pipes_unchopped_machete(self):
115 "Touch the unchopped cryopipes with the machete. They chop." 121 "Touch the unchopped cryopipes with the machete. They chop."
116 122
117 self.state.add_inventory_item('machete') 123 self.state.add_inventory_item('machete')
118 self.assert_game_data('fixed', True, 'cryo.pipe.left') 124 self.assert_game_data('fixed', True, 'cryo.pipe.left')
119 self.assert_game_data('fixed', True, 'cryo.pipe.right') 125 self.assert_game_data('fixed', True, 'cryo.pipe.right.top')
126 self.assert_game_data('fixed', True, 'cryo.pipe.right.bottom')
120 self.assert_item_exists('cryo_pipe.0', False) 127 self.assert_item_exists('cryo_pipe.0', False)
121 self.assert_item_exists('cryo_pipe.1', False) 128 self.assert_item_exists('cryo_pipe.1', False)
129 self.assert_item_exists('cryo_pipe.2', False)
122 130
123 self.assertNotEquals(None, self.interact_thing('cryo.pipe.left', 'machete')) 131 self.assertNotEquals(None, self.interact_thing('cryo.pipe.left', 'machete'))
124 self.assertNotEquals(None, self.interact_thing('cryo.pipe.right', 'machete')) 132 self.assertNotEquals(None, self.interact_thing('cryo.pipe.right.top', 'machete'))
133 self.assertNotEquals(None, self.interact_thing('cryo.pipe.right.bottom', 'machete'))
125 134
126 self.assert_game_data('fixed', False, 'cryo.pipe.left') 135 self.assert_game_data('fixed', False, 'cryo.pipe.left')
127 self.assert_game_data('fixed', False, 'cryo.pipe.right') 136 self.assert_game_data('fixed', False, 'cryo.pipe.right.top')
128 self.assert_item_exists('cryo_pipe.0') 137 self.assert_game_data('fixed', False, 'cryo.pipe.right.bottom')
129 self.assert_item_exists('cryo_pipe.1') 138 self.assert_item_exists('tube_fragment.0')
130 self.assert_inventory_item('cryo_pipe.0', True) 139 self.assert_item_exists('tube_fragment.1')
131 self.assert_inventory_item('cryo_pipe.1', True) 140 self.assert_item_exists('tube_fragment.2')
141 self.assert_inventory_item('tube_fragment.0', True)
142 self.assert_inventory_item('tube_fragment.1', True)
143 self.assert_inventory_item('tube_fragment.2', True)
132 144
133 def test_pipes_chopped_machete(self): 145 def test_pipes_chopped_machete(self):
134 "Touch the chopped cryopipes with the machete. No change." 146 "Touch the chopped cryopipes with the machete. No change."
135 147
136 self.state.add_inventory_item('machete') 148 self.state.add_inventory_item('machete')
137 self.set_game_data('fixed', False, 'cryo.pipe.left') 149 self.set_game_data('fixed', False, 'cryo.pipe.left')
138 self.set_game_data('fixed', False, 'cryo.pipe.right') 150 self.set_game_data('fixed', False, 'cryo.pipe.right.top')
151 self.set_game_data('fixed', False, 'cryo.pipe.right.bottom')
139 152
140 self.assertEquals(None, self.interact_thing('cryo.pipe.left', 'machete')) 153 self.assertEquals(None, self.interact_thing('cryo.pipe.left', 'machete'))
141 self.assertEquals(None, self.interact_thing('cryo.pipe.right', 'machete')) 154 self.assertEquals(None, self.interact_thing('cryo.pipe.right.top', 'machete'))
155 self.assertEquals(None, self.interact_thing('cryo.pipe.right.bottom', 'machete'))
142 156
143 self.assert_game_data('fixed', False, 'cryo.pipe.left') 157 self.assert_game_data('fixed', False, 'cryo.pipe.left')
144 self.assert_game_data('fixed', False, 'cryo.pipe.right') 158 self.assert_game_data('fixed', False, 'cryo.pipe.right.top')
159 self.assert_game_data('fixed', False, 'cryo.pipe.right.bottom')