Update SIP to 4.19.4

This commit is contained in:
Robin Dunn
2017-11-02 21:13:51 -07:00
parent 0fb1ce987a
commit 666761337b
11 changed files with 1253 additions and 360 deletions

28
unittests/test_dtor.py Normal file
View File

@@ -0,0 +1,28 @@
import unittest
from unittests import wtc
import wx
#---------------------------------------------------------------------------
class dtor_Tests(wtc.WidgetTestCase):
def test_dtor(self):
# Test that a __dtor__ method is called when a wrapped C++ class is
# destroyed
class MyPanel(wx.Panel):
def __init__(self, parent):
super(MyPanel, self).__init__(parent)
self.Parent.dtor_called = False
def __dtor__(self):
self.Parent.dtor_called = True
panel = MyPanel(self.frame)
self.myYield()
assert not self.frame.dtor_called
panel.Destroy()
self.myYield()
assert self.frame.dtor_called