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

Method testDict

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

Source from the content-addressed store, hash-verified

271''')
272
273 def testDict(self):
274 splootFile = splootFromPython('''d = {"hello": "hallo"}
275print(d)
276print(d["hello"])
277''')
278
279 f = io.StringIO()
280 f.write = wrapStdout(f.write)
281 with contextlib.redirect_stdout(f):
282 executePythonFile(splootFile)
283
284 f.seek(0)
285 self.assertEqual(f.read(), "{'hello': 'hallo'}\nhallo\n")
286
287 def testMemberExpression(self):
288 splootFile = splootFromPython('''d = 12

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