MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_center

Method test_center

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

assertEqualMethod · 0.45
centerMethod · 0.45

Tested by

no test coverage detected