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

Method testTuples

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

Source from the content-addressed store, hash-verified

298 self.assertEqual(f.read(), "12/1\n")
299
300 def testTuples(self):
301 splootFile = splootFromPython('''x = ()
302y = ('hi',)
303z = ("a", 'b')
304print(x, y, z)
305''')
306
307 f = io.StringIO()
308 f.write = wrapStdout(f.write)
309 with contextlib.redirect_stdout(f):
310 executePythonFile(splootFile)
311
312 f.seek(0)
313 self.assertEqual(f.read(), "() ('hi',) ('a', 'b')\n")
314
315 def testSets(self):
316 splootFile = splootFromPython('''x = {1, 2, 1, 1}

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