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

Method testImport

python/tests/test_convert_ast.py:236–260  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

234}})
235
236 def testImport(self):
237 self.maxDiff = None
238
239 fileNode = splootFromPython('import random')
240 self.assertEqual(fileNode, {
241 'type': 'PYTHON_FILE',
242 'childSets': {
243 'body': [{
244 "type": "PYTHON_STATEMENT",
245 "childSets": {
246 "statement": [{
247 'type': 'PYTHON_IMPORT',
248 'childSets': {
249 'modules': [
250 {'type': 'PYTHON_MODULE_IDENTIFIER', 'childSets': {}, 'properties': {'identifier': 'random'},}
251 ]
252 },
253 'properties': {},
254 }]
255 },
256 'properties': {},
257 }]
258 },
259 'properties': {},
260 })
261
262
263 def testImportFrom(self):

Callers

nothing calls this directly

Calls 1

splootFromPythonFunction · 0.90

Tested by

no test coverage detected