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

Method test_named_sequences_sample

Lib/test/test_ucn.py:191–205  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

189 self.assertEqual(str(cm.exception), 'no such name')
190
191 def test_named_sequences_sample(self):
192 # Check a few named sequences. See #12753.
193 sequences = [
194 ('LATIN SMALL LETTER R WITH TILDE', '\u0072\u0303'),
195 ('TAMIL SYLLABLE SAI', '\u0BB8\u0BC8'),
196 ('TAMIL SYLLABLE MOO', '\u0BAE\u0BCB'),
197 ('TAMIL SYLLABLE NNOO', '\u0BA3\u0BCB'),
198 ('TAMIL CONSONANT KSS', '\u0B95\u0BCD\u0BB7\u0BCD'),
199 ]
200 for seqname, codepoints in sequences:
201 self.assertEqual(unicodedata.lookup(seqname), codepoints)
202 with self.assertRaises(SyntaxError):
203 self.checkletter(seqname, None)
204 with self.assertRaises(KeyError):
205 unicodedata.ucd_3_2_0.lookup(seqname)
206
207 def test_named_sequences_full(self):
208 # Check all the named sequences

Callers

nothing calls this directly

Calls 4

checkletterMethod · 0.95
assertEqualMethod · 0.45
lookupMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected