MCPcopy Index your code
hub / github.com/OmkarPathak/pygorithm / test_linear_search

Method test_linear_search

tests/test_searching.py:24–32  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

22
23class TestLinearSearch(TestSearchingAlgorithm):
24 def test_linear_search(self):
25 result = linear_search.search(self.array, 7)
26 self.assertIs(result, 7)
27
28 alpha_result = linear_search.search(self.alphaArray, 'n')
29 self.assertIs(alpha_result, 5)
30
31 alpha_result = linear_search.search(self.array, 'n')
32 self.assertIs(alpha_result, -1)
33
34
35class TestBinarySearch(TestSearchingAlgorithm):

Callers

nothing calls this directly

Calls 1

searchMethod · 0.80

Tested by

no test coverage detected