MCPcopy
hub / github.com/keon/algorithms / test_three_sum

Method test_three_sum

tests/test_array.py:372–378  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

370
371class TestThreeSum(unittest.TestCase):
372 def test_three_sum(self):
373
374 self.assertSetEqual(three_sum([-1, 0, 1, 2, -1, -4]), {(-1, 0, 1), (-1, -1, 2)})
375
376 self.assertSetEqual(
377 three_sum([-1, 3, 1, 2, -1, -4, -2]), {(-4, 1, 3), (-2, -1, 3), (-1, -1, 2)}
378 )
379
380
381class TestTwoSum(unittest.TestCase):

Callers

nothing calls this directly

Calls 1

three_sumFunction · 0.90

Tested by

no test coverage detected