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)
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)
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())
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)