Fix DeprecationWarning in test_bytes (GH-10805)
Running test_bytes with python -3 -Wd emits two DeprecationWarning on "1/0". Use "1//0" to prevent the warning.
This commit is contained in:
parent
f3fe21a3ca
commit
d7a880c3c2
|
@ -161,13 +161,13 @@ class BaseBytesTest(unittest.TestCase):
|
|||
# exceptions.
|
||||
class BadInt:
|
||||
def __index__(self):
|
||||
1/0
|
||||
1//0
|
||||
self.assertRaises(ZeroDivisionError, self.type2test, BadInt())
|
||||
self.assertRaises(ZeroDivisionError, self.type2test, [BadInt()])
|
||||
|
||||
class BadIterable:
|
||||
def __iter__(self):
|
||||
1/0
|
||||
1//0
|
||||
self.assertRaises(ZeroDivisionError, self.type2test, BadIterable())
|
||||
|
||||
def test_compare(self):
|
||||
|
|
Loading…
Reference in New Issue