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

Method test_get_charsets

Lib/test/test_email/test_email.py:144–159  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

142 msg.attach, sub_msg)
143
144 def test_get_charsets(self):
145 eq = self.assertEqual
146
147 msg = self._msgobj('msg_08.txt')
148 charsets = msg.get_charsets()
149 eq(charsets, [None, 'us-ascii', 'iso-8859-1', 'iso-8859-2', 'koi8-r'])
150
151 msg = self._msgobj('msg_09.txt')
152 charsets = msg.get_charsets('dingbat')
153 eq(charsets, ['dingbat', 'us-ascii', 'iso-8859-1', 'dingbat',
154 'koi8-r'])
155
156 msg = self._msgobj('msg_12.txt')
157 charsets = msg.get_charsets()
158 eq(charsets, [None, 'us-ascii', 'iso-8859-1', None, 'iso-8859-2',
159 'iso-8859-3', 'us-ascii', 'koi8-r'])
160
161 def test_get_filename(self):
162 eq = self.assertEqual

Callers

nothing calls this directly

Calls 3

eqFunction · 0.85
get_charsetsMethod · 0.80
_msgobjMethod · 0.45

Tested by

no test coverage detected