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

Method testMemberExpression

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

Source from the content-addressed store, hash-verified

285 self.assertEqual(f.read(), "{'hello': 'hallo'}\nhallo\n")
286
287 def testMemberExpression(self):
288 splootFile = splootFromPython('''d = 12
289print(str(d.numerator) + '/' + str(d.denominator))
290''')
291
292 f = io.StringIO()
293 f.write = wrapStdout(f.write)
294 with contextlib.redirect_stdout(f):
295 executePythonFile(splootFile)
296
297 f.seek(0)
298 self.assertEqual(f.read(), "12/1\n")
299
300 def testTuples(self):
301 splootFile = splootFromPython('''x = ()

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