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

Method testReturnBare

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

Source from the content-addressed store, hash-verified

349 self.assertEqual(f.read(), "{'fred': 'blogs', ('foo', 'bar'): ['list', 'of', 'things']}\n")
350
351 def testReturnBare(self):
352 splootFile = splootFromPython('''
353def test():
354 return
355
356if 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('''

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