Home | History | Annotate | Download | only in test

Lines Matching refs:expect

31     def check(self, result, expect):
32 self.assertEqual(result, expect,
34 self.show(expect), self.show(result)))
36 def check_wrap(self, text, width, expect, **kwargs):
38 self.check(result, expect)
40 def check_split(self, text, expect):
42 self.assertEqual(result, expect,
44 "but got %r" % (expect, result))
90 expect = ["This is a paragraph that already has line",
98 self.check(result, expect)
101 self.check(result, '\n'.join(expect))
110 expect = ["A short line. Note the single space."]
111 self.check(wrapper.wrap(text), expect)
117 expect = ["Well, Doctor? What do you think?"]
118 self.check(wrapper.wrap(text), expect)
121 self.check(wrapper.wrap(text), expect)
124 expect = ['I say, chaps! Anyone for "tennis?" Hmmph!']
125 self.check(wrapper.wrap(text), expect)
128 expect = ['I say, chaps!', 'Anyone for "tennis?"', 'Hmmph!']
129 self.check(wrapper.wrap(text), expect)
132 expect = ['And she said, "Go to',
135 self.check(wrapper.wrap(text), expect)
138 expect = ['And she said, "Go to hell!" Can you believe that?']
139 self.check(wrapper.wrap(text), expect)
142 expect = ['File stdio.h is nice.']
143 self.check(wrapper.wrap(text), expect)
211 expect = ["Em-dashes should be written --",
213 self.check_wrap(text, 30, expect)
214 self.check_wrap(text, 35, expect)
221 expect = ["You can also do",
224 self.check_wrap(text, 15, expect)
225 self.check_wrap(text, 16, expect)
226 expect = ["You can also do--",
229 self.check_wrap(text, 17, expect)
230 self.check_wrap(text, 19, expect)
231 expect = ["You can also do--this or even",
233 self.check_wrap(text, 29, expect)
234 self.check_wrap(text, 31, expect)
235 expect = ["You can also do--this or even---",
237 self.check_wrap(text, 32, expect)
238 self.check_wrap(text, 35, expect)
243 expect = ["Here's", " ", "an", " ", "--", " ", "em-", "dash", " ",
246 self.check_split(text, expect)
249 expect = ["and", " ", "then", "--", "bam!", "--",
251 self.check_split(text, expect)
268 expect = ["You should use the -n option, or",
270 self.check_wrap(text, 32, expect)
271 self.check_wrap(text, 34, expect)
272 self.check_wrap(text, 35, expect)
273 self.check_wrap(text, 38, expect)
274 expect = ["You should use the -n option, or --dry-",
276 self.check_wrap(text, 39, expect)
277 self.check_wrap(text, 41, expect)
278 expect = ["You should use the -n option, or --dry-run",
280 self.check_wrap(text, 42, expect)
284 expect = ["the", " ", "-n", " ", "option,", " ", "or", " ",
286 self.check_split(text, expect)
487 expect = ['Did you say',
493 self.check(result, expect)
497 self.check(result, expect)
512 expect = '''\
518 self.check(result, expect)
524 expect = [" This paragraph will be filled,",
528 self.check(result, expect)
530 expect = "\n".join(expect)
532 self.check(result, expect)
538 expect = '''\
546 self.check(result, expect)
577 expect = "Hello there.\nHow are ya?\nOh good."
578 self.assertEqual(expect, dedent(text))
582 expect = "Hello there.\n\nHow are ya?\nOh good.\n"
583 self.assertEqual(expect, dedent(text))
587 expect = "Hello there.\n\nHow are ya?\nOh good.\n"
588 self.assertEqual(expect, dedent(text))
597 expect = '''\
602 self.assertEqual(expect, dedent(text))
606 expect = "Foo\n Bar\n\n Baz\n"
607 self.assertEqual(expect, dedent(text))
611 expect = "Foo\n Bar\n\n Baz\n"
612 self.assertEqual(expect, dedent(text))
617 expect = "hello\tthere\nhow are\tyou?"
618 self.assertEqual(expect, dedent(text))
622 self.assertEqual(expect, dedent(expect))
637 expect = "hello there\nhow are you?"
638 self.assertEqual(expect, dedent(text))
641 self.assertEqual(expect, dedent(text))
644 self.assertEqual(expect, dedent(text))
647 expect = "hello there\n how are you?"
648 self.assertEqual(expect, dedent(text))