added ex3
This commit is contained in:
		| @@ -1,8 +1,27 @@ | ||||
| import unittest | ||||
|  | ||||
| from Ex3 import findTightlyLinkedConsoles | ||||
|  | ||||
|  | ||||
| class MyTestCase(unittest.TestCase): | ||||
|     def test_simple1(self): | ||||
|         pass | ||||
|         self.assertEqual( | ||||
|             findTightlyLinkedConsoles(3,[(0,1),(0,4),(2,1),(3,1),(4,2),(2,3)]), | ||||
|             [1,2,3] | ||||
|         ) | ||||
|  | ||||
|     def test_simple2(self): | ||||
|         self.assertEqual( | ||||
|             findTightlyLinkedConsoles(4,[(0,1),(0,4),(2,1),(3,1),(4,2),(2,3)]), | ||||
|             [] | ||||
|         ) | ||||
|  | ||||
|     def test_simple3(self): | ||||
|         self.assertEqual( | ||||
|             findTightlyLinkedConsoles(4,[(0,1),(0,4),(2,1),(3,1),(4,2),(2,3),(1,4),(4,3)]), | ||||
|             [1,2,3,4] | ||||
|         ) | ||||
|  | ||||
|  | ||||
| if __name__ == '__main__': | ||||
|     unittest.main() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user