Lines Matching refs:assertTrue

15         self.assertTrue(strop.atoi(" 1 ") == 1)
20 self.assertTrue(strop.atol(" 1 ") == 1L)
25 self.assertTrue(strop.atof(" 1 ") == 1.0)
30 self.assertTrue(strop.capitalize(" hello ") == " hello ")
31 self.assertTrue(strop.capitalize("hello ") == "Hello ")
34 self.assertTrue(strop.find("abcdefghiabc", "abc") == 0)
35 self.assertTrue(strop.find("abcdefghiabc", "abc", 1) == 9)
36 self.assertTrue(strop.find("abcdefghiabc", "def", 4) == -1)
39 self.assertTrue(strop.rfind("abcdefghiabc", "abc") == 9)
42 self.assertTrue(strop.lower("HeLLo") == "hello")
45 self.assertTrue(strop.upper("HeLLo") == "HELLO")
48 self.assertTrue(strop.swapcase("HeLLo cOmpUteRs") == "hEllO CoMPuTErS")
51 self.assertTrue(strop.strip(" \t\n hello \t\n ") == "hello")
54 self.assertTrue(strop.lstrip(" \t\n hello \t\n ") == "hello \t\n ")
57 self.assertTrue(strop.rstrip(" \t\n hello \t\n ") == " \t\n hello")
61 self.assertTrue(replace("one!two!three!", '!', '@', 1)
63 self.assertTrue(replace("one!two!three!", '!', '@', 2)
65 self.assertTrue(replace("one!two!three!", '!', '@', 3)
67 self.assertTrue(replace("one!two!three!", '!', '@', 4)
74 self.assertTrue(replace("one!two!three!", '!', '@', 0)
76 self.assertTrue(replace("one!two!three!", '!', '@')
78 self.assertTrue(replace("one!two!three!", 'x', '@')
80 self.assertTrue(replace("one!two!three!", 'x', '@', 2)
85 self.assertTrue(split("this is the split function")
87 self.assertTrue(split("a|b|c|d", '|') == ['a', 'b', 'c', 'd'])
88 self.assertTrue(split("a|b|c|d", '|', 2) == ['a', 'b', 'c|d'])
89 self.assertTrue(split("a b c d", None, 1) == ['a', 'b c d'])
90 self.assertTrue(split("a b c d", None, 2) == ['a', 'b', 'c d'])
91 self.assertTrue(split("a b c d", None, 3) == ['a', 'b', 'c', 'd'])
92 self.assertTrue(split("a b c d", None, 4) == ['a', 'b', 'c', 'd'])
93 self.assertTrue(split("a b c d", None, 0) == ['a', 'b', 'c', 'd'])
94 self.assertTrue(split("a b c d", None, 2) == ['a', 'b', 'c d'])
97 self.assertTrue(strop.join(['a', 'b', 'c', 'd']) == 'a b c d')
98 self.assertTrue(strop.join(('a', 'b', 'c', 'd'), '') == 'abcd')
99 self.assertTrue(strop.join(Sequence()) == 'w x y z')
102 self.assertTrue(strop.join(['x' * 100] * 100, ':')
104 self.assertTrue(strop.join(('x' * 100,) * 100, ':')
108 self.assertTrue(strop.maketrans("abc", "xyz") == transtable)
112 self.assertTrue(strop.translate("xyzabcdef", transtable, "def")