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

Method _create

Lib/test/test_plistlib.py:415–440  ·  view source on GitHub ↗
(self, fmt=None)

Source from the content-addressed store, hash-verified

413 pass
414
415 def _create(self, fmt=None):
416 pl = dict(
417 aString="Doodah",
418 aList=["A", "B", 12, 32.5, [1, 2, 3]],
419 aFloat = 0.5,
420 anInt = 728,
421 aBigInt = 2 ** 63 - 44,
422 aBigInt2 = 2 ** 63 + 44,
423 aNegativeInt = -5,
424 aNegativeBigInt = -80000000000,
425 aDict=dict(
426 anotherString="<hello & 'hi' there!>",
427 aUnicodeValue='M\xe4ssig, Ma\xdf',
428 aTrueValue=True,
429 aFalseValue=False,
430 deeperDict=dict(a=17, b=32.5, c=[1, 2, "text"]),
431 ),
432 someData = b"<binary gunk>",
433 someMoreData = b"<lots of binary gunk>\0\1\2\3" * 10,
434 nestedData = [b"<lots of binary gunk>\0\1\2\3" * 10],
435 aDate = datetime.datetime(2004, 10, 26, 10, 33, 33),
436 anEmptyDict = dict(),
437 anEmptyList = list()
438 )
439 pl['\xc5benraa'] = "That was a unicode key."
440 return pl
441
442 def test_create(self):
443 pl = self._create()

Callers 7

test_createMethod · 0.95
test_ioMethod · 0.95
test_bytesMethod · 0.95
test_bytesioMethod · 0.95
test_xml_encodingsMethod · 0.95

Calls 2

listClass · 0.85
datetimeMethod · 0.80

Tested by

no test coverage detected