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

Method test_linebreak_7643

Lib/test/test_unicodedata.py:1174–1183  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1172 self.assertEqual("\u01c6".title(), "\u01c5")
1173
1174 def test_linebreak_7643(self):
1175 for c in iterallchars():
1176 lines = (c + 'A').splitlines()
1177 if c in ('\x0a', '\x0b', '\x0c', '\x0d', '\x85',
1178 '\x1c', '\x1d', '\x1e', '\u2028', '\u2029'):
1179 self.assertEqual(len(lines), 2,
1180 r"%a should be a linebreak" % c)
1181 else:
1182 self.assertEqual(len(lines), 1,
1183 r"%a should not be a linebreak" % c)
1184
1185 def test_segment_object(self):
1186 segments = list(unicodedata.iter_graphemes('spa\u0300m'))

Callers

nothing calls this directly

Calls 3

iterallcharsFunction · 0.85
splitlinesMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected