Exemplo n.º 1
0
 def testWriteBlock(self):
     writer = util.Writer()
     mod_block = block.ModuleBlock(imputil_test.MockPath(), '__main__',
                                   '<test>', '', stmt.FutureFeatures())
     writer.write_block(mod_block, 'BODY')
     output = writer.getvalue()
     dispatch = 'switch πF.State() {\n\tcase 0:\n\tdefault: panic'
     self.assertIn(dispatch, output)
     self.assertIn('return nil, nil\n}', output)
Exemplo n.º 2
0
def _MakeModuleBlock():
  return block.ModuleBlock('__main__', 'grumpy', 'grumpy/lib', '<test>', [],
                           stmt.FutureFeatures())
Exemplo n.º 3
0
def _MakeModuleBlock():
    return block.ModuleBlock(imputil_test.MockPath(), '__main__', '<test>', '',
                             stmt.FutureFeatures())
Exemplo n.º 4
0
def _MakeModuleBlock():
    return block.ModuleBlock('__main__', '<test>', '', stmt.FutureFeatures())