def test_loading_instructions(self): contents = """\ 5 5 1 2 N LMLMLMLMM 3 3 E MMRMMRMRRM """ sio = StringIO(contents) twmission = TWMission(sio) twmission.execute() self.assertEquals(twmission.report(), "1 3 N\n5 1 E\n")
#!/usr/bin/env python import sys from marsmission.twmission import TWMission twm = TWMission(sys.stdin) print "waiting for input" twm.execute() print twm.report()