AlgoDS-Examen2025/tests/test_ex3.py
LordBaryhobal 0dcccd2b74
All checks were successful
Python unit tests / unittests (push) Successful in 4s
updated test imports
2025-01-28 17:32:57 +01:00

28 lines
654 B
Python

import unittest
from src.Ex3 import findTightlyLinkedConsoles
class MyTestCase(unittest.TestCase):
def test_simple1(self):
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()