fix zero-division tests
@@ -2,33 +2,33 @@ try:
5 / 0
except ZeroDivisionError:
pass
-except:
+else:
assert False, 'Expected ZeroDivisionError'
try:
5 / -0.0
except ZeroDivisionError:
pass
-except:
+else:
assert False, 'Expected ZeroDivisionError'
try:
- 5 / (3-2)
+ 5 / (2-2)
except ZeroDivisionError:
pass
-except:
+else:
assert False, 'Expected ZeroDivisionError'
try:
5 % 0
except ZeroDivisionError:
pass
-except:
+else:
assert False, 'Expected ZeroDivisionError'
try:
raise ZeroDivisionError('Is an ArithmeticError subclass?')
except ArithmeticError:
pass
-except:
- assert False, 'Expected ZeroDivisionError to be a subclass of ArithmeticError'
+else:
+ assert False, 'Expected ZeroDivisionError'
