MCPcopy
hub / github.com/django/django / test_normalize_newlines

Method test_normalize_newlines

tests/utils_tests/test_text.py:334–343  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

332 self.assertEqual(text.wrap(lazystr(digits), 100), "1234 67 9")
333
334 def test_normalize_newlines(self):
335 self.assertEqual(
336 text.normalize_newlines("abc\ndef\rghi\r\n"), "abc\ndef\nghi\n"
337 )
338 self.assertEqual(text.normalize_newlines("\n\r\r\n\r"), "\n\n\n\n")
339 self.assertEqual(text.normalize_newlines("abcdefghi"), "abcdefghi")
340 self.assertEqual(text.normalize_newlines(""), "")
341 self.assertEqual(
342 text.normalize_newlines(lazystr("abc\ndef\rghi\r\n")), "abc\ndef\nghi\n"
343 )
344
345 def test_phone2numeric(self):
346 numeric = text.phone2numeric("0800 flowers")

Callers

nothing calls this directly

Calls 1

lazystrFunction · 0.90

Tested by

no test coverage detected