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

Class TestGeneratorBase

Lib/test/test_email/test_generator.py:14–289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12
13@parameterize
14class TestGeneratorBase:
15
16 policy = policy.default
17
18 def msgmaker(self, msg, policy=None):
19 policy = self.policy if policy is None else policy
20 return self.msgfunc(msg, policy=policy)
21
22 refold_long_expected = {
23 0: textwrap.dedent("""\
24 To: whom_it_may_concern@example.com
25 From: nobody_you_want_to_know@example.com
26 Subject: We the willing led by the unknowing are doing the
27 impossible for the ungrateful. We have done so much for so long with so little
28 we are now qualified to do anything with nothing.
29
30 None
31 """),
32 40: textwrap.dedent("""\
33 To: whom_it_may_concern@example.com
34 From:
35 nobody_you_want_to_know@example.com
36 Subject: We the willing led by the
37 unknowing are doing the impossible for
38 the ungrateful. We have done so much
39 for so long with so little we are now
40 qualified to do anything with nothing.
41
42 None
43 """),
44 20: textwrap.dedent("""\
45 To:
46 whom_it_may_concern@example.com
47 From:
48 nobody_you_want_to_know@example.com
49 Subject: We the
50 willing led by the
51 unknowing are doing
52 the impossible for
53 the ungrateful. We
54 have done so much
55 for so long with so
56 little we are now
57 qualified to do
58 anything with
59 nothing.
60
61 None
62 """),
63 }
64 refold_long_expected[100] = refold_long_expected[0]
65
66 refold_all_expected = refold_long_expected.copy()
67 refold_all_expected[0] = (
68 "To: whom_it_may_concern@example.com\n"
69 "From: nobody_you_want_to_know@example.com\n"
70 "Subject: We the willing led by the unknowing are doing the "
71 "impossible for the ungrateful. We have done so much for "

Callers

nothing calls this directly

Calls 2

dedentMethod · 0.45
copyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…