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:
Victor Stinner 2018-11-30 11:04:42 +01:00 committed by GitHub
parent f3fe21a3ca
commit d7a880c3c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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):