Lines Matching refs:formatted
444 formatted = pprint.pformat(ns)
445 self.assertEqual(formatted, "namespace()")
449 formatted = pprint.pformat(ns)
450 self.assertEqual(formatted, "namespace(a=1, b=2)")
464 formatted = pprint.pformat(ns, width=60, indent=4)
465 self.assertEqual(formatted, """\
489 formatted = pprint.pformat(ns, width=60)
490 self.assertEqual(formatted, """\
503 formatted = pprint.pformat(dc)
504 self.assertEqual(formatted, "MyDataclass()")
508 formatted = pprint.pformat(dc)
509 self.assertEqual(formatted, "dataclass1(field1='text', field2=123, field3=False)")
513 formatted = pprint.pformat([dc, dc], width=60, indent=4)
514 self.assertEqual(formatted, """\
524 formatted = pprint.pformat(dc, width=20)
525 self.assertEqual(formatted, "custom repr that doesn't fit within pprint width")
529 formatted = pprint.pformat(dc, width=10)
530 self.assertRegex(formatted, r"<test.test_pprint.dataclass3 object at \w+>")
535 formatted = pprint.pformat(dc, width=10)
536 self.assertEqual(formatted, """\
545 formatted = pprint.pformat(dc5, width=10)
546 self.assertEqual(formatted, """\
940 formatted = pprint.pformat(special, width=width)
941 self.assertEqual(eval(formatted), special)
942 formatted = pprint.pformat([special] * 2, width=width)
943 self.assertEqual(eval(formatted), [special] * 2)
1021 formatted = pprint.pformat(special, width=width)
1022 self.assertEqual(eval(formatted), special)
1023 formatted = pprint.pformat([special] * 2, width=width)
1024 self.assertEqual(eval(formatted), [special] * 2)