예제 #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)