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

Method testList

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

Source from the content-addressed store, hash-verified

168 }})
169
170 def testList(self):
171 self.maxDiff = None
172 splootFile = splootFromPython('''x = ['hello', 123]''')
173
174 f = io.StringIO()
175 f.write = wrapStdout(f.write)
176 with contextlib.redirect_stdout(f):
177 cap, _ = executePythonFile(splootFile)
178
179 self.assertEqual(cap, {
180 'root': {
181 'type': 'PYTHON_FILE',
182 'data': {
183 'body': [
184 {
185 'type': 'PYTHON_ASSIGNMENT',
186 'data': {'result': "['hello', 123]", 'resultType': 'list'}
187 }
188 ]
189 }
190 },
191 'detached': {}
192 })
193
194 def testExpressionParsing(self):
195 splootFile = splootFromPython('''print(100 + 10 + 10 + 4 * 3 * 2 + 10 + 10)''')

Callers

nothing calls this directly

Calls 3

splootFromPythonFunction · 0.90
wrapStdoutFunction · 0.90
executePythonFileFunction · 0.90

Tested by

no test coverage detected