(self)
| 393 | self.assertEqual(f.read(), "hello--thereEND") |
| 394 | |
| 395 | def testMethodCall(self): |
| 396 | splootFile = splootFromPython('''x = 'hello'\nx = x.replace('lo', 'LO')\nprint(x)''') |
| 397 | f = io.StringIO() |
| 398 | f.write = wrapStdout(f.write) |
| 399 | with contextlib.redirect_stdout(f): |
| 400 | executePythonFile(splootFile) |
| 401 | |
| 402 | f.seek(0) |
| 403 | self.assertEqual(f.read(), "helLO\n") |
| 404 | |
| 405 | def testDecorator(self): |
| 406 | splootFile = splootFromPython(''' |
nothing calls this directly
no test coverage detected