]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/OOR.py
corrected assert even better
[wxWidgets.git] / wxPython / demo / OOR.py
index 7306ed9efd7b8c0e6f9591f00b7f83165bf0f15d..9b4088fb8d82376664764b43a59b876a900c5977 100644 (file)
@@ -32,6 +32,8 @@ class TestPanel(wxPanel):
         self.SetSizer(sizer)
         self.SetAutoLayout(true)
 
         self.SetSizer(sizer)
         self.SetAutoLayout(true)
 
+        self.sizer = sizer  # save it for testing later
+
         EVT_BUTTON(self, BTN1, self.OnFindButton1)
         EVT_BUTTON(self, BTN2, self.OnFindButton2)
 
         EVT_BUTTON(self, BTN1, self.OnFindButton1)
         EVT_BUTTON(self, BTN2, self.OnFindButton2)
 
@@ -68,6 +70,15 @@ class TestPanel(wxPanel):
         else:
             self.log.write("The objects are NOT the same! <frown>\n")
 
         else:
             self.log.write("The objects are NOT the same! <frown>\n")
 
+        sizer = self.GetSizer()
+        if sizer is None:
+            self.log.write("***** OOPS! None returned...\n")
+            return
+        if sizer is self.sizer:
+            self.log.write("The objects are the same! <grin>\n")
+        else:
+            self.log.write("The objects are NOT the same! <frown>\n")
+
 
 #----------------------------------------------------------------------
 
 
 #----------------------------------------------------------------------