minor tweaks for the pi generator

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70973 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2012-03-22 20:30:45 +00:00
parent 19db0eb058
commit 8bac95e6e0
4 changed files with 11 additions and 3 deletions

View File

@@ -161,8 +161,8 @@ INCLUDES = [ # core
'tipwin',
# misc
'process',
'utils',
'process',
'uiaction',
'snglinst',

View File

@@ -45,7 +45,7 @@ class PiWrapperGenerator(generators.WrapperGeneratorBase):
def generate(self, module, destFile=None):
stream = StringIO()
# generate SIP code from the module and its objects
# process the module object and its child objects
self.generateModule(module, stream)
# Write the contents of the stream to the destination file
@@ -105,6 +105,11 @@ class PiWrapperGenerator(generators.WrapperGeneratorBase):
"""
assert isinstance(module, extractors.ModuleDef)
for item in module.imports:
if item.startswith('_'):
item = item[1:]
stream.write('from %s import *\n' % item)
methodMap = {
extractors.ClassDef : self.generateClass,
extractors.DefineDef : self.generateDefine,

View File

@@ -13,6 +13,7 @@ class aboutdlg_Tests(wtc.WidgetTestCase):
info.SetName('My Goofy App')
info.SetDevelopers(['Goofy', 'Mickey', 'Donald'])
info.SetDescription('This is a very goofy application')
info.SetCopyright('(c) by Goofy Enterprises, Inc.')
return info
def test_aboutdlgNative(self):

View File

@@ -11,7 +11,7 @@ class PIImportTest(unittest.TestCase):
the extension modules and that are not easily introspected.
This test case ensures that the code in the pi files is valid by trying
to run the file with a with a new instance of Python.
to run the file with a new instance of Python.
"""
def runPI(self, filename):
@@ -34,6 +34,8 @@ class PIImportTest(unittest.TestCase):
def test_core_pi(self):
self.runPI('core.pi')
#def test_adv_pi(self):
# self.runPI('adv.pi')
#---------------------------------------------------------------------------