MCPcopy Index your code
hub / github.com/python/cpython / test_center

Method test_center

Lib/test/test_str.py:1007–1014  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1005 self.assertEqual('\u1fd2'.swapcase(), '\u0399\u0308\u0300')
1006
1007 def test_center(self):
1008 string_tests.StringLikeTest.test_center(self)
1009 self.assertEqual('x'.center(2, '\U0010FFFF'),
1010 'x\U0010FFFF')
1011 self.assertEqual('x'.center(3, '\U0010FFFF'),
1012 '\U0010FFFFx\U0010FFFF')
1013 self.assertEqual('x'.center(4, '\U0010FFFF'),
1014 '\U0010FFFFx\U0010FFFF\U0010FFFF')
1015
1016 @unittest.skipUnless(sys.maxsize == 2**31 - 1, "requires 32-bit system")
1017 @support.cpython_only

Callers

nothing calls this directly

Calls 2

assertEqualMethod · 0.45
centerMethod · 0.45

Tested by

no test coverage detected