1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Refs #33476 -- Refactored code to strictly match 88 characters line length.

This commit is contained in:
Mariusz Felisiak
2022-02-04 08:08:27 +01:00
parent 9c19aff7c7
commit 7119f40c98
404 changed files with 5944 additions and 2842 deletions

View File

@@ -122,10 +122,12 @@ class TestUtilsText(SimpleTestCase):
def test_truncate_html_words(self):
truncator = text.Truncator(
'<p id="par"><strong><em>The quick brown fox jumped over the lazy dog.</em></strong></p>'
'<p id="par"><strong><em>The quick brown fox jumped over the lazy dog.</em>'
"</strong></p>"
)
self.assertEqual(
'<p id="par"><strong><em>The quick brown fox jumped over the lazy dog.</em></strong></p>',
'<p id="par"><strong><em>The quick brown fox jumped over the lazy dog.</em>'
"</strong></p>",
truncator.words(10, html=True),
)
self.assertEqual(
@@ -143,7 +145,8 @@ class TestUtilsText(SimpleTestCase):
# Test with new line inside tag
truncator = text.Truncator(
'<p>The quick <a href="xyz.html"\n id="mylink">brown fox</a> jumped over the lazy dog.</p>'
'<p>The quick <a href="xyz.html"\n id="mylink">brown fox</a> jumped over '
"the lazy dog.</p>"
)
self.assertEqual(
'<p>The quick <a href="xyz.html"\n id="mylink">brown…</a></p>',