added ex1

This commit is contained in:
2025-01-28 13:53:10 +01:00
parent 7312f8a293
commit 70daa208d0
2 changed files with 76 additions and 1 deletions

View File

@ -1,8 +1,26 @@
import unittest
from Ex1 import countKey
class MyTestCase(unittest.TestCase):
def test_simple1(self):
pass
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()