Exemple #1
0
 def test_concat(self):
     r = str_calculator('t', 2, "+")
     self.assertEqual = (r, 'tt')
Exemple #2
0
 def test_in(self):
     r = str_calculator("glob","hemoglobina", "in")
     self.assertEqual(r, True)
Exemple #3
0
 def test_concat(self):
     r = str_calculator('a', 'c', 'concat')
     self.assertEqual(r, 'ac')
Exemple #4
0
 def test_concat(self):
     r = str_calculator("a", "b", 'concat')
     self.assertEqual(r, 'ab')
Exemple #5
0
 def test_konczysie(self):
     r = str_calculator('a', 'aadadda', 'end')
     self.assertEqual(r, True)
Exemple #6
0
 def test_wielkielitery(self):
     r = str_calculator('ada', 'ADA', 'upper')
     self.assertEqual(r, True)
Exemple #7
0
 def test_zawiera(self):
     r = str_calculator('a', 'aaa', 'incl')
     self.assertEqual(r, True)
Exemple #8
0
 def test_niezawiera(self):
     r = str_calculator('b', 'aaa', 'notincl')
     self.assertEqual(r, False)
    def test_startb(self):
        r = str_calculator("abcd", "ab", 'startb')
        self.assertTrue(r)

        p = str_calculator("abcd", "f", 'startb')
        self.assertFalse(p)
 def test_enda_neg(self):
     r = str_calculator("f", "abcd", 'enda')
     self.assertFalse(r)
 def test_enda_pos(self):
     r = str_calculator("dm", "abcdm", 'enda')
     self.assertTrue(r)
 def test_contain_neg(self):
     r = str_calculator("abcd", "cd", 'contain')
     self.assertTrue(r)
 def test_contain_pos(self):
     r = str_calculator("abcd", "cde", 'contain')
     self.assertEqual(r, -1)