From ef1f21802f6067ff4de2ff27b25b9cbfc47438cb Mon Sep 17 00:00:00 2001 From: Chau Long Do Date: Wed, 4 May 2022 12:03:30 +0700 Subject: [PATCH] Create reachability_test.py add reachability unit test --- .../1_finding_exit_from_maze/reachability_test.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 3. Algorithms on Graph/Week1-Graph-Decomposition1/1_finding_exit_from_maze/reachability_test.py diff --git a/3. Algorithms on Graph/Week1-Graph-Decomposition1/1_finding_exit_from_maze/reachability_test.py b/3. Algorithms on Graph/Week1-Graph-Decomposition1/1_finding_exit_from_maze/reachability_test.py new file mode 100644 index 0000000..18162fd --- /dev/null +++ b/3. Algorithms on Graph/Week1-Graph-Decomposition1/1_finding_exit_from_maze/reachability_test.py @@ -0,0 +1,13 @@ +import unittest +from reachability import reach + + +class TestStringMethods(unittest.TestCase): + + def test_equal(self): + self.assertEqual(reach([[1, 3], [0, 2], [1, 3], [0, 2]], 0, 3), 1, "This should be 1") + self.assertEqual(reach([[1], [0, 2], [1], []], 0, 3), 0, "This should be 0") + + +if __name__ == '__main__': + unittest.main()