コード例 #1
0
ファイル: test_game.py プロジェクト: laurahutton/first-game
    def test_move_by_alias(self):
        hallway = HallwayRoom()
        outside = OutsideRoom()
        hallway.add_exit("north", outside)

        self.assertEqual(hallway.move("n"), outside)
コード例 #2
0
ファイル: test_game.py プロジェクト: laurahutton/first-game
    def test_move_non_exit(self):
        hallway = HallwayRoom()
        outside = OutsideRoom()
        hallway.add_exit("north", outside)

        self.assertIsNone(hallway.move("south"))