예제 #1
0
 def test_creature(self):
     object_type = "creature"
     creature = Object(object_type)
     self.assertEqual(creature.type, object_type)
     self.assertEqual(creature.color, POSSIBLE_OBJECTS[object_type]["color"])
     self.assertEqual(creature.moved_in_current_round, False)
예제 #2
0
 def test_not_existing_object(self):
     with self.assertRaises(ValueError):
         Object("wrong object type")