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

Method test_rjust

Lib/test/test_bytes.py:984–989  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

982 self.type2test(b'abc----'))
983
984 def test_rjust(self):
985 # Fill character can be either bytes or bytearray (issue 12380)
986 b = self.type2test(b'abc')
987 for fill_type in (bytes, bytearray):
988 self.assertEqual(b.rjust(7, fill_type(b'-')),
989 self.type2test(b'----abc'))
990
991 def test_xjust_int_error(self):
992 self.assertRaises(TypeError, self.type2test(b'abc').center, 7, 32)

Callers

nothing calls this directly

Calls 3

type2testMethod · 0.80
assertEqualMethod · 0.45
rjustMethod · 0.45

Tested by

no test coverage detected