added exercise 2
This commit is contained in:
@ -9,6 +9,7 @@ class MyTestCase(unittest.TestCase):
|
||||
countTriangles([(0, 1), (1, 2), (0, 2)]),
|
||||
1
|
||||
)
|
||||
|
||||
def test_simple2(self):
|
||||
self.assertEqual(
|
||||
countTriangles([(2, 1), (1, 2), (2, 3)]),
|
||||
|
21
tests/test_ex2.py
Normal file
21
tests/test_ex2.py
Normal file
@ -0,0 +1,21 @@
|
||||
import unittest
|
||||
|
||||
from ex2_tv import startRecordingAt
|
||||
|
||||
|
||||
class MyTestCase(unittest.TestCase):
|
||||
def test_simple1(self):
|
||||
self.assertEqual(
|
||||
startRecordingAt([12, 22, 32, 42, 25, 12], 52),
|
||||
2
|
||||
)
|
||||
|
||||
def test_simple2(self):
|
||||
self.assertEqual(
|
||||
startRecordingAt([12, 22, 32, 42, 25, 12], 80),
|
||||
3
|
||||
)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
Reference in New Issue
Block a user