From ed6197e069fe9c1e7b13326ad0d4d97e0250e9c4 Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Sun, 27 Mar 2016 22:27:43 -0400 Subject: [PATCH] Fix throbber test crash on GTK2 Move GetBitmap() code into test case so that it is not executed before the wx.App object is created. --- unittests/test_lib_throbber.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/unittests/test_lib_throbber.py b/unittests/test_lib_throbber.py index cb9726cc..f799babf 100644 --- a/unittests/test_lib_throbber.py +++ b/unittests/test_lib_throbber.py @@ -5,9 +5,6 @@ import wx.lib.throbber as th import throbImages -images = [throbImages.catalog[i].GetBitmap() - for i in throbImages.index - if i not in ['eclouds', 'logo']] #--------------------------------------------------------------------------- @@ -15,6 +12,9 @@ class lib_throbber_Tests(wtc.WidgetTestCase): def test_lib_throbber(self): pnl = wx.Panel(self.frame) + images = [throbImages.catalog[i].GetBitmap() + for i in throbImages.index + if i not in ['eclouds', 'logo']] w = th.Throbber(pnl, -1, images, size=(36, 36)) def test_lib_throbber_Events(self):