Exemple #1
0
 def test_first_N_words_of_context_longer(self):
     text = '1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45.'
     shortened_text = '1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42'
     context = Bookmark.get_first_N_words_of_context(text)
     assert context == shortened_text
Exemple #2
0
 def test_first_N_words_of_context_shorter(self):
     text = '1 2 3 4 5 6 7'
     context = Bookmark.get_first_N_words_of_context(text)
     assert context == text