-
Notifications
You must be signed in to change notification settings - Fork 1
/
test1.py
21 lines (16 loc) · 826 Bytes
/
test1.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import unittest
from program1 import Solution
class TestSolution(unittest.TestCase):
def setUp(self):
self.solution = Solution()
def test_case1(self):
result = self.solution.getTotalIsles([["L","L","L","L","W"],["L","L","W","L","W"],["L","L","W","W","W"],["W","W","W","W","W"]])
self.assertEqual(result, 1)
def test_case2(self):
result = self.solution.getTotalIsles([["L","L","W","W","W"],["L","L","W","W","W"],["W","W","L","W","W"],["W","W","W","L","L"]])
self.assertEqual(result, 3)
def test_case3(self):
result = self.solution.getTotalIsles([["W", "W", "W", "W"], ["W", "L", "L", "W"], ["W", "L", "L", "W"], ["W", "W", "W", "W"]])
self.assertEqual(result, 1)
if __name__ == '__main__':
unittest.main(argv=['first-arg-is-ignored'], exit=False)