(self)
| 366 | self.assertEqual(f.read(), 'hello\n') |
| 367 | |
| 368 | def testReturnWithValue(self): |
| 369 | splootFile = splootFromPython(''' |
| 370 | def test(): |
| 371 | return 1 + 1 |
| 372 | |
| 373 | if test() == 2: |
| 374 | print("hello") |
| 375 | ''') |
| 376 | |
| 377 | f = io.StringIO() |
| 378 | f.write = wrapStdout(f.write) |
| 379 | with contextlib.redirect_stdout(f): |
| 380 | executePythonFile(splootFile) |
| 381 | |
| 382 | f.seek(0) |
| 383 | self.assertEqual(f.read(), 'hello\n') |
| 384 | |
| 385 | def testKwargs(self): |
| 386 | splootFile = splootFromPython('''print('hello', 'there', sep="--", end="END")''') |
nothing calls this directly
no test coverage detected