From d7a880c3c2b73415a42c8a2f900c6bc597de115d Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 30 Nov 2018 11:04:42 +0100 Subject: [PATCH] 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. --- Lib/test/test_bytes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py index c04f7b305a0..cb2a4d95787 100644 --- a/Lib/test/test_bytes.py +++ b/Lib/test/test_bytes.py @@ -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):