21 lines
410 B
Python
21 lines
410 B
Python
import unittest
|
|
|
|
from ex1_triangles import countTriangles
|
|
|
|
|
|
class MyTestCase(unittest.TestCase):
|
|
def test_simple1(self):
|
|
self.assertEqual(
|
|
countTriangles([(0, 1), (1, 2), (0, 2)]),
|
|
1
|
|
)
|
|
def test_simple2(self):
|
|
self.assertEqual(
|
|
countTriangles([(2, 1), (1, 2), (2, 3)]),
|
|
0
|
|
)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|