Mercurial > pyntnclick
comparison gamelib/tests/game_logic_utils.py @ 331:a1ffc919d0c1
Add is_in_inventory helper
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Sat, 28 Aug 2010 14:10:54 +0200 |
parents | ca0c2875ad8f |
children | bfb6c682b4fb |
comparison
equal
deleted
inserted
replaced
330:8f85902f4cb6 | 331:a1ffc919d0c1 |
---|---|
38 if thing is not None: | 38 if thing is not None: |
39 gizmo = gizmo.things[thing] | 39 gizmo = gizmo.things[thing] |
40 self.assertEquals(value, gizmo.get_data(key)) | 40 self.assertEquals(value, gizmo.get_data(key)) |
41 | 41 |
42 def assert_inventory_item(self, item, in_inventory=True): | 42 def assert_inventory_item(self, item, in_inventory=True): |
43 self.assertEquals(in_inventory, self.state.items[item] in self.state.inventory) | 43 self.assertEquals(in_inventory, self.state.is_in_inventory(item)) |
44 | 44 |
45 def assert_scene_thing(self, thing, in_scene=True): | 45 def assert_scene_thing(self, thing, in_scene=True): |
46 self.assertEquals(in_scene, thing in self.state.current_scene.things) | 46 self.assertEquals(in_scene, thing in self.state.current_scene.things) |
47 | 47 |
48 def assert_detail_thing(self, thing, in_detail=True): | 48 def assert_detail_thing(self, thing, in_detail=True): |