def test_indent_simple(self): s = String("foo\nbar\nche") s2 = s.indent(" ") self.assertNotEqual(s, s2) for line in s2.splitlines(): self.assertTrue(line.startswith(" "))
def test_indent_count(self): s = String("foo") self.assertTrue(s.indent(".", 3).startswith("...")) self.assertFalse(s.indent(".", 2).startswith("..."))