remove most of Python2 compatibility code

This commit is contained in:
Alexandre Detiste
2024-03-22 00:06:03 +01:00
committed by Scott Talbert
parent beb9932241
commit 0257f755cf
108 changed files with 220 additions and 2144 deletions

View File

@@ -2,7 +2,6 @@ import unittest
from unittests import wtc
import wx
import os
import six
pngFile = os.path.join(os.path.dirname(__file__), 'toucan.png')
@@ -58,10 +57,7 @@ class BitmapTests(wtc.WidgetTestCase):
self.assertTrue( not b1.IsOk() )
b2 = wx.Bitmap(5, 10, 24)
self.assertTrue( b2.IsOk() )
if six.PY3:
self.assertTrue( b2.__bool__() == b2.IsOk() )
else:
self.assertTrue( b2.__nonzero__() == b2.IsOk() )
self.assertTrue( b2.__bool__() == b2.IsOk() )
# check that the __nonzero__ method can be used with if statements
nzcheck = False