Exemplo n.º 1
0
    def test_random(self):
        for i in range(10**1):
            text = ''
            for i in range(10**4):
                text += chr(random.randint(97,122))
            string = 'cde'

            self.assertEqual(find_string(string, text), string in text)
Exemplo n.º 2
0
    def test_basic(self):
        text = "abcde"
        string = 'cde'

        self.assertEqual(find_string(string, text), string in text)
Exemplo n.º 3
0
    def test_none(self):
        text = "abcdefghijkl"
        string = 'mn'

        self.assertEqual(find_string(string, text), string in text)
Exemplo n.º 4
0
    def test_all(self):
        text = "abcdefghijkl"
        string = 'abcdefghijkl'

        self.assertEqual(find_string(string, text), string in text)