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

Method _create

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

Source from the content-addressed store, hash-verified

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