diff options
| author | Victor Stinner <vstinner@redhat.com> | 2018-11-30 11:04:42 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-30 11:04:42 +0100 |
| commit | d7a880c3c2b73415a42c8a2f900c6bc597de115d (patch) | |
| tree | 91c7fd56bd82e36704e8434cd2222f18b557f1e4 | |
| parent | f3fe21a3cacbc5d13c3e61cefb36ce0efe617cd7 (diff) | |
| download | cpython-git-d7a880c3c2b73415a42c8a2f900c6bc597de115d.tar.gz | |
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.
| -rw-r--r-- | Lib/test/test_bytes.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py index c04f7b305a..cb2a4d9578 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): |
