Ejemplo n.º 1
0
 def test_capture_help(self):
     # Show all capture arguments.
     try:
         capture.main(['--help'])
     except SystemExit as status:
         if status.code != 0:
             self.fail("Error occured when running --help.")
Ejemplo n.º 2
0
    def test_capture(self):
        replayPath = os.path.join(tempfile.gettempdir(), CAPTURE_FILENAME)

        capture.main(['--null-graphics', '--fps=1000', '--record', replayPath])

        self.assertTrue(os.path.isfile(replayPath))

        capture.main(['--null-graphics', '--replay', replayPath])

        os.remove(replayPath)
Ejemplo n.º 3
0
    def test_capture_seeded_maze_generations(self):
        # Run game of capture with random generated map without seed value.
        capture.main(['--null-graphics', '--layout', 'RANDOM']) 

        # Run game of capture with random generated map with seed value.
        capture.main(['--null-graphics', '--layout', 'RANDOM94'])
Ejemplo n.º 4
0
    def test_seeded_runs(self):
        # Run game of capture with seed entry.
        capture.main(['--null-graphics', '--seed', '1234'])

        # Run game of pacman with seed value entry.
        pacman.main(['-p', 'GreedyAgent', '--null-graphics', '--seed', '1234'])
Ejemplo n.º 5
0
 def test_capture(self):
     # Run game of capture with default agents.
     capture.main(['--null-graphics'])