summaryrefslogtreecommitdiff
path: root/tests/utils_tests/test_text.py
diff options
context:
space:
mode:
authorza <za@python.or.id>2016-10-27 14:53:39 +0700
committerTim Graham <timograham@gmail.com>2016-11-10 21:30:21 -0500
commit321e94fa41b121f65c02119c02098df327bbd569 (patch)
treece5476c191d589aca4b124f841dfbccac8dd299f /tests/utils_tests/test_text.py
parent4bb70cbcc60794f515c9bfefeca87b8272d33c0c (diff)
Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.
Diffstat (limited to 'tests/utils_tests/test_text.py')
-rw-r--r--tests/utils_tests/test_text.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/utils_tests/test_text.py b/tests/utils_tests/test_text.py
index 1ce993bdb2..3dfc33a120 100644
--- a/tests/utils_tests/test_text.py
+++ b/tests/utils_tests/test_text.py
@@ -56,14 +56,11 @@ class TestUtilsText(SimpleTestCase):
self.assertEqual(list(text.smart_split(test)), expected)
def test_truncate_chars(self):
- truncator = text.Truncator(
- 'The quick brown fox jumped over the lazy dog.'
- )
+ truncator = text.Truncator('The quick brown fox jumped over the lazy dog.')
self.assertEqual('The quick brown fox jumped over the lazy dog.', truncator.chars(100)),
self.assertEqual('The quick brown fox ...', truncator.chars(23)),
self.assertEqual('The quick brown fo.....', truncator.chars(23, '.....')),
- # Ensure that we normalize our unicode data first
nfc = text.Truncator('o\xfco\xfco\xfco\xfc')
nfd = text.Truncator('ou\u0308ou\u0308ou\u0308ou\u0308')
self.assertEqual('oüoüoüoü', nfc.chars(8))
@@ -88,7 +85,7 @@ class TestUtilsText(SimpleTestCase):
# Make a best effort to shorten to the desired length, but requesting
# a length shorter than the ellipsis shouldn't break
self.assertEqual('...', text.Truncator('asdf').chars(1))
- # Ensure that lazy strings are handled correctly
+ # lazy strings are handled correctly
self.assertEqual(text.Truncator(lazystr('The quick brown fox')).chars(12), 'The quick...')
def test_truncate_words(self):
@@ -96,7 +93,7 @@ class TestUtilsText(SimpleTestCase):
self.assertEqual('The quick brown fox jumped over the lazy dog.', truncator.words(10))
self.assertEqual('The quick brown fox...', truncator.words(4))
self.assertEqual('The quick brown fox[snip]', truncator.words(4, '[snip]'))
- # Ensure that lazy strings are handled correctly
+ # lazy strings are handled correctly
truncator = text.Truncator(lazystr('The quick brown fox jumped over the lazy dog.'))
self.assertEqual('The quick brown fox...', truncator.words(4))