(self)
| 349 | self.assertEqual(f.read(), "{'fred': 'blogs', ('foo', 'bar'): ['list', 'of', 'things']}\n") |
| 350 | |
| 351 | def testReturnBare(self): |
| 352 | splootFile = splootFromPython(''' |
| 353 | def test(): |
| 354 | return |
| 355 | |
| 356 | if test() is None: |
| 357 | print("hello") |
| 358 | ''') |
| 359 | |
| 360 | f = io.StringIO() |
| 361 | f.write = wrapStdout(f.write) |
| 362 | with contextlib.redirect_stdout(f): |
| 363 | executePythonFile(splootFile) |
| 364 | |
| 365 | f.seek(0) |
| 366 | self.assertEqual(f.read(), 'hello\n') |
| 367 | |
| 368 | def testReturnWithValue(self): |
| 369 | splootFile = splootFromPython(''' |
nothing calls this directly
no test coverage detected