mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-04 11:00:07 +01:00
@@ -70,6 +70,12 @@ def run():
|
||||
module.find('wxGetOsVersion.major').out = True
|
||||
module.find('wxGetOsVersion.minor').out = True
|
||||
|
||||
c = module.find('wxBusyCursor')
|
||||
# add context manager methods
|
||||
c.addPyMethod('__enter__', '(self)', 'return self')
|
||||
c.addPyMethod('__exit__', '(self, exc_type, exc_val, exc_tb)', 'pass')
|
||||
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
tools.doCommonTweaks(module)
|
||||
tools.runGenerators(module)
|
||||
|
||||
@@ -29,7 +29,10 @@ class utils_Tests(wtc.WidgetTestCase):
|
||||
self.assertTrue( wx.IsBusy())
|
||||
wx.EndBusyCursor()
|
||||
self.assertTrue(not wx.IsBusy())
|
||||
|
||||
|
||||
def test_utilsBusyCursor3(self):
|
||||
with wx.BusyCursor():
|
||||
self.myYield()
|
||||
|
||||
def test_utilsSomeOtherStuff(self):
|
||||
wx.GetBatteryState()
|
||||
|
||||
Reference in New Issue
Block a user