MCPcopy Create free account
hub / github.com/SplootCode/splootcode / testMethodCall

Method testMethodCall

python/tests/test_execute.py:395–403  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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('''

Callers

nothing calls this directly

Calls 4

splootFromPythonFunction · 0.90
wrapStdoutFunction · 0.90
executePythonFileFunction · 0.90
readMethod · 0.80

Tested by

no test coverage detected