added ex1
This commit is contained in:
@ -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()
|
||||
|
Reference in New Issue
Block a user