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.")
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)
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'])
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'])
def test_capture(self): # Run game of capture with default agents. capture.main(['--null-graphics'])