# Path: string_algorithms/search/naive_search.py
# def naive_search(text, pattern, start_index=0):
#     for i in xrange(start_index, len(text) - len(pattern) + 1):
#         found = True
#         for j in xrange(len(pattern)):
#             if text[i + j] != pattern[j]:
#                 found = False
#                 break
# 
#         if found:
#             return i
# 
#     return -1


from unittest.case import TestCase
from string_algorithms.search.naive_search import naive_search


class NaiveSearchTests(TestCase):

    def get_strings(self):
        return "abcdabcdabcdabcdabcdabcdabcdabcd", "bcd"

    def test_search1(self):
        text, pattern = self.get_strings()


# Path: string_algorithms/search/naive_search.py
# def naive_search(text, pattern, start_index=0):
#     for i in xrange(start_index, len(text) - len(pattern) + 1):
#         found = True
#         for j in xrange(len(pattern)):
#             if text[i + j] != pattern[j]:
#                 found = False
#                 break
# 
#         if found:
#             return i
# 
#     return -1


# Path: tests/string_algorithms/search/naive_search_tests.py
from unittest.case import TestCase
from string_algorithms.search.naive_search import naive_search



class NaiveSearchTests(TestCase):

    def get_strings(self):
        return "abcdabcdabcdabcdabcdabcdabcdabcd", "bcd"

    def test_search1(self):
        text, pattern = self.get_strings()


        ind = naive_search(text, pattern)