AlgoDS-Examen2024/tests/test_ex1.py

21 lines
414 B
Python
Raw 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
)
def test_simple2(self):
self.assertEqual(
countTriangles([(2, 1), (1, 2), (2, 3)]),
0
)
if __name__ == '__main__':
unittest.main()