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))
81 expect = ["This is a paragraph that already has line",
89 self.check(result, expect)
92 self.check(result, '\n'.join(expect))
101 expect = ["A short line. Note the single space."]
102 self.check(wrapper.wrap(text), expect)
108 expect = ["Well, Doctor? What do you think?"]
109 self.check(wrapper.wrap(text), expect)
112 self.check(wrapper.wrap(text), expect)
115 expect = ['I say, chaps! Anyone for "tennis?" Hmmph!']
116 self.check(wrapper.wrap(text), expect)
119 expect = ['I say, chaps!', 'Anyone for "tennis?"', 'Hmmph!']
120 self.check(wrapper.wrap(text), expect)
123 expect = ['And she said, "Go to',
126 self.check(wrapper.wrap(text), expect)
129 expect = ['And she said, "Go to hell!" Can you believe that?']
130 self.check(wrapper.wrap(text), expect)
133 expect = ['File stdio.h is nice.']
134 self.check(wrapper.wrap(text), expect)
202 expect = ["Em-dashes should be written --",
204 self.check_wrap(text, 30, expect)
205 self.check_wrap(text, 35, expect)
212 expect = ["You can also do",
215 self.check_wrap(text, 15, expect)
216 self.check_wrap(text, 16, expect)
217 expect = ["You can also do--",
220 self.check_wrap(text, 17, expect)
221 self.check_wrap(text, 19, expect)
222 expect = ["You can also do--this or even",
224 self.check_wrap(text, 29, expect)
225 self.check_wrap(text, 31, expect)
226 expect = ["You can also do--this or even---",
228 self.check_wrap(text, 32, expect)
229 self.check_wrap(text, 35, expect)
234 expect = ["Here's", " ", "an", " ", "--", " ", "em-", "dash", " ",
237 self.check_split(text, expect)
240 expect = ["and", " ", "then", "--", "bam!", "--",
242 self.check_split(text, expect)
259 expect = ["You should use the -n option, or",
261 self.check_wrap(text, 32, expect)
262 self.check_wrap(text, 34, expect)
263 self.check_wrap(text, 35, expect)
264 self.check_wrap(text, 38, expect)
265 expect = ["You should use the -n option, or --dry-",
267 self.check_wrap(text, 39, expect)
268 self.check_wrap(text, 41, expect)
269 expect = ["You should use the -n option, or --dry-run",
271 self.check_wrap(text, 42, expect)
275 expect = ["the", " ", "-n", " ", "option,", " ", "or", " ",
277 self.check_split(text, expect)
439 expect = ['Did you say',
445 self.check(result, expect)
449 self.check(result, expect)
464 expect = '''\
470 self.check(result, expect)
476 expect = [" This paragraph will be filled,",
480 self.check(result, expect)
482 expect = "\n".join(expect)
484 self.check(result, expect)
490 expect = '''\
498 self.check(result, expect)
529 expect = "Hello there.\nHow are ya?\nOh good."
530 self.assertEqual(expect, dedent(text))
534 expect = "Hello there.\n\nHow are ya?\nOh good.\n"
535 self.assertEqual(expect, dedent(text))
539 expect = "Hello there.\n\nHow are ya?\nOh good.\n"
540 self.assertEqual(expect, dedent(text))
549 expect = '''\
554 self.assertEqual(expect, dedent(text))
558 expect = "Foo\n Bar\n\n Baz\n"
559 self.assertEqual(expect, dedent(text))
563 expect = "Foo\n Bar\n\n Baz\n"
564 self.assertEqual(expect, dedent(text))
569 expect = "hello\tthere\nhow are\tyou?"
570 self.assertEqual(expect, dedent(text))
574 self.assertEqual(expect, dedent(expect))
589 expect = "hello there\nhow are you?"
590 self.assertEqual(expect, dedent(text))
593 self.assertEqual(expect, dedent(text))
596 self.assertEqual(expect, dedent(text))
599 expect = "hello there\n how are you?"
600 self.assertEqual(expect, dedent(text))