It's the Text of the test; the Input is (will be) something else.
Cat's Eye Technologies
11 years ago
185 | 185 | pass |
186 | 186 | |
187 | 187 | |
188 | class TestInput(Block): | |
188 | class TestText(Block): | |
189 | 189 | pass |
190 | 190 | |
191 | 191 | |
204 | 204 | ##### Documents ##### |
205 | 205 | |
206 | 206 | PREFIX = { |
207 | ' | ': TestInput, | |
207 | ' | ': TestText, | |
208 | 208 | ' ? ': ExpectedError, |
209 | 209 | ' = ': ExpectedResult, |
210 | 210 | ' ->': Pragma, |
246 | 246 | >>> d.append(' = Indented result') |
247 | 247 | >>> d.parse_lines_to_blocks() |
248 | 248 | >>> [b.__class__.__name__ for b in d.blocks] |
249 | ['InterveningMarkdown', 'Pragma', 'TestInput', 'ExpectedError', | |
250 | 'TestInput', 'ExpectedResult'] | |
249 | ['InterveningMarkdown', 'Pragma', 'TestText', 'ExpectedError', | |
250 | 'TestText', 'ExpectedResult'] | |
251 | 251 | >>> [b.line_num for b in d.blocks] |
252 | 252 | [1, 2, 3, 5, 6, 7] |
253 | 253 | |
368 | 368 | if isinstance(block, ExpectedResult): |
369 | 369 | expectation_class = OutputResult |
370 | 370 | if expectation_class: |
371 | if isinstance(prev_block, TestInput): | |
371 | if isinstance(prev_block, TestText): | |
372 | 372 | if current_functionality is None: |
373 | 373 | raise FalderalSyntaxError( |
374 | 374 | ("line %d: " % block.line_num) + |
383 | 383 | ("line %d: " % block.line_num) + |
384 | 384 | "expectation must be preceded by test input") |
385 | 385 | else: |
386 | if isinstance(prev_block, TestInput): | |
386 | if isinstance(prev_block, TestText): | |
387 | 387 | raise FalderalSyntaxError( |
388 | 388 | ("line %d: " % block.line_num) + |
389 | 389 | "test input must be followed by expectation") |