From: Victor Stinner Date: Fri, 30 Nov 2018 10:04:42 +0000 (+0100) Subject: Fix DeprecationWarning in test_bytes (GH-10805) X-Git-Tag: v2.7.16rc1~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7a880c3c2b73415a42c8a2f900c6bc597de115d;p=thirdparty%2FPython%2Fcpython.git 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. --- diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py index c04f7b305a0a..cb2a4d95787d 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):