def test_alignment_digit(self): self.assertEqual(cli.alignment('中文1', 6), '中文1 ') self.assertEqual(cli.alignment('中12', 6), '中12 ')
def test_alignment_alphabet(self): self.assertEqual(cli.alignment('中文a', 6), '中文a ') self.assertEqual(cli.alignment('中ab', 6), '中ab ')
def test_alignment(self): self.assertEqual(cli.alignment('中文', 4), '中文') self.assertEqual(cli.alignment('中文', 6), '中文 ')