mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-05 11:30:06 +01:00
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:
@@ -161,8 +161,8 @@ INCLUDES = [ # core
|
||||
'tipwin',
|
||||
|
||||
# misc
|
||||
'process',
|
||||
'utils',
|
||||
'process',
|
||||
'uiaction',
|
||||
'snglinst',
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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')
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user