示例#1
0
文件: test.py 项目: afshinm/paintshop
    def test_simple1_example(self):
        with open(os.path.join("fixtures", "simple1.txt")) as fs:
            output = ["Case #1: 1 1 1"]

            self.assertEqual(find_solution(fs.readlines()), output)
示例#2
0
文件: test.py 项目: afshinm/paintshop
    def test_backtrack(self):
        with open(os.path.join("fixtures", "back_track.txt")) as fs:
            output = ["Case #1: 0 0 1"]

            self.assertEqual(find_solution(fs.readlines()), output)
示例#3
0
文件: test.py 项目: afshinm/paintshop
 def test_large_dataset(self):
     with open(os.path.join("fixtures", "large_dataset.txt")) as fs:
         # todo: write assert for this
         find_solution(fs.readlines())
示例#4
0
文件: test.py 项目: afshinm/paintshop
    def test_simple2_example(self):
        with open(os.path.join("fixtures", "simple2.txt")) as fs:
            output = ["Case #1: 1 0 0 0 0",
                      "Case #2: IMPOSSIBLE"]

            self.assertEqual(find_solution(fs.readlines()), output)