22 lines
415 B
Python
Raw Permalink Normal View History

2025-01-16 10:47:32 +01:00
import unittest
2025-01-16 10:48:44 +01:00
from src.ex1_triangles import countTriangles
2025-01-16 10:47:32 +01:00
class MyTestCase(unittest.TestCase):
def test_simple1(self):
self.assertEqual(
countTriangles([(0, 1), (1, 2), (0, 2)]),
1
)
2025-01-16 11:01:55 +01:00
2025-01-16 10:47:32 +01:00
def test_simple2(self):
self.assertEqual(
countTriangles([(2, 1), (1, 2), (2, 3)]),
0
)
if __name__ == '__main__':
unittest.main()