diff --git a/buildtools/config.py b/buildtools/config.py index 726e0239..673013da 100644 --- a/buildtools/config.py +++ b/buildtools/config.py @@ -771,9 +771,11 @@ def myExecfile(filename, ns): if sys.version_info < (3,): execfile(filename, ns) else: - source = open(filename, 'r').read() + f = open(filename, 'r') + source = f.read() + f.close() exec(source, ns) - + def textfile_open(filename, mode='rt'): """ diff --git a/etgtools/sip_generator.py b/etgtools/sip_generator.py index a1257f25..44875e27 100644 --- a/etgtools/sip_generator.py +++ b/etgtools/sip_generator.py @@ -649,6 +649,9 @@ from .%s import * for idx, pn in enumerate(pnames): # take only the part before the =, if there is one name = pn.split('=')[0].strip() + # remove annotations + name = re.sub('/[A-Za-z]*/', '', name) + name = name.strip() # now get just the part after any space, * or &, which should be # the parameter name name = re.split(r'[ \*\&]+', name)[-1] @@ -690,6 +693,7 @@ from .%s import * # take only the part before the =, if there is one arg = arg.split('=')[0].strip() arg = arg.replace('&', '*') # SIP will always want to use pointers for parameters + arg = re.sub('/[A-Za-z]*/', '', arg) # remove annotations fargs[idx] = arg fargs = ', '.join(fargs) if method.isCtor: diff --git a/unittests/runtests.py b/unittests/runtests.py index b10a9b19..0151ec19 100755 --- a/unittests/runtests.py +++ b/unittests/runtests.py @@ -9,7 +9,7 @@ else: # run as main? if not d: d = '.' phoenixDir = os.path.abspath(d+'/..') -#if phoenixDir not in sys.path: +# in case phoenixDir not in sys.path: sys.path.insert(0, phoenixDir) # stuff for debugging diff --git a/unittests/test_animate.py b/unittests/test_animate.py index be57da34..47892066 100644 --- a/unittests/test_animate.py +++ b/unittests/test_animate.py @@ -17,13 +17,14 @@ class animate_Tests(wtc.WidgetTestCase): self.assertTrue(ani.IsOk()) anictrl = wx.adv.AnimationCtrl(self.frame, anim=ani) anictrl.Play() - + self.waitFor(500) def test_animate2(self): ani = wx.adv.Animation(gifFile) self.assertTrue(ani.IsOk()) anictrl = wx.adv.AnimationCtrl(self.frame, anim=ani) anictrl.Play() + self.waitFor(500) #---------------------------------------------------------------------------