added exercise 3

This commit is contained in:
2025-01-16 11:21:53 +01:00
parent 84fde862e1
commit 160a79906d
2 changed files with 73 additions and 0 deletions

20
tests/test_ex3.py Normal file
View File

@ -0,0 +1,20 @@
import unittest
from ex3_cards import tauntScore
class MyTestCase(unittest.TestCase):
def test_simple1(self):
self.assertEqual(
tauntScore([1, 3, 2, 2]),
5
)
def test_simple2(self):
self.assertEqual(
tauntScore([1, 3, 45, 12, 2, 12]),
58
)
if __name__ == '__main__':
unittest.main()