AlgoDS-Examen2025/tests/test_ex1.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

27 lines
570 B
Python

import unittest
from src.Ex1 import countKey
class MyTestCase(unittest.TestCase):
def test_simple1(self):
self.assertEqual(
countKey([-3, 4, 2, 8, 9, 1, -3, -8, -4, 2, 8, 2, -8, 1, 3]),
4
)
def test_simple2(self):
self.assertEqual(
countKey([-4, 5, 6, -1500, 4, 7, 49, 60, -60, 82, -41, 1500, 1, -7]),
4
)
def test_simple3(self):
self.assertEqual(
countKey([-3, -2, -1, 1, 2, 5]),
2
)
if __name__ == '__main__':
unittest.main()