Add wx.EmptyBitmap for compatibility, but mark it as deprecated

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@70614 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2012-02-16 01:25:32 +00:00
parent d5a4e871ce
commit 24c20d9e25
2 changed files with 19 additions and 1 deletions

View File

@@ -23,6 +23,17 @@ class BitmapTests(wtc.WidgetTestCase):
img = wx.Image(pngFile)
b6 = wx.Bitmap(img)
self.assertTrue( b6.IsOk() )
def test_EmptyBitmapFactory(self):
# wx.EmptyBitmap is supposed to be deprecated, make sure it is.
import warnings
with warnings.catch_warnings():
warnings.simplefilter("error")
with self.assertRaises(wx.wxPyDeprecationWarning):
b7 = wx.EmptyBitmap(5,10, 32)
self.assertTrue( b7.IsOk() )
def test_Bitmap__nonzero__(self):