Commit 4dc05c34 authored by Serhiy Storchaka's avatar Serhiy Storchaka Committed by GitHub

Fix py3k warnings in 1/0 in tests. (#4072)

parent 8fa0648f
......@@ -202,7 +202,7 @@ class SimpleTypesTestCase(unittest.TestCase):
class WorseStruct(Structure):
@property
def __dict__(self):
1/0
1/0.0
with self.assertRaises(ZeroDivisionError):
WorseStruct().__setstate__({}, b'foo')
......
......@@ -3,7 +3,7 @@ from json.tests import CTest
class BadBool:
def __nonzero__(self):
1/0
1/0.0
class TestSpeedups(CTest):
......
......@@ -313,10 +313,10 @@ class MersenneTwister_TestBasicOps(TestBasicOps):
# long/int subclass argument.
class BadInt(int):
def __abs__(self):
1/0
1/0.0
class BadLong(long):
def __abs__(self):
1/0
1/0.0
self.gen.seed(42)
expected_value = self.gen.random()
for seed_arg in [42L, BadInt(42), BadLong(42)]:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment