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

Method test_aliases

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

Source from the content-addressed store, hash-verified

118
119 @unittest.expectedFailure # TODO: RUSTPYTHON
120 def test_aliases(self):
121 # Check that the aliases defined in the NameAliases.txt file work.
122 # This should be updated when new aliases are added or the file
123 # should be downloaded and parsed instead. See #12753.
124 aliases = [
125 ('LATIN CAPITAL LETTER GHA', 0x01A2),
126 ('LATIN SMALL LETTER GHA', 0x01A3),
127 ('KANNADA LETTER LLLA', 0x0CDE),
128 ('LAO LETTER FO FON', 0x0E9D),
129 ('LAO LETTER FO FAY', 0x0E9F),
130 ('LAO LETTER RO', 0x0EA3),
131 ('LAO LETTER LO', 0x0EA5),
132 ('TIBETAN MARK BKA- SHOG GI MGO RGYAN', 0x0FD0),
133 ('YI SYLLABLE ITERATION MARK', 0xA015),
134 ('PRESENTATION FORM FOR VERTICAL RIGHT WHITE LENTICULAR BRACKET', 0xFE18),
135 ('BYZANTINE MUSICAL SYMBOL FTHORA SKLIRON CHROMA VASIS', 0x1D0C5)
136 ]
137 for alias, codepoint in aliases:
138 self.checkletter(alias, chr(codepoint))
139 name = unicodedata.name(chr(codepoint))
140 self.assertNotEqual(name, alias)
141 self.assertEqual(unicodedata.lookup(alias),
142 unicodedata.lookup(name))
143 with self.assertRaises(KeyError):
144 unicodedata.ucd_3_2_0.lookup(alias)
145
146 def test_aliases_names_in_pua_range(self):
147 # We are storing aliases in the PUA 15, but their names shouldn't leak

Callers

nothing calls this directly

Calls 7

checkletterMethod · 0.95
chrFunction · 0.85
assertNotEqualMethod · 0.80
nameMethod · 0.45
assertEqualMethod · 0.45
lookupMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected