diff --git a/tests/float/complex1.py b/tests/float/complex1.py index fed65d5d54e90ee2210b59af2daeab9d01196cb9..1031111f37b9820b97a1d8d0f7e8c0ac14b4cc31 100644 --- a/tests/float/complex1.py +++ b/tests/float/complex1.py @@ -28,6 +28,7 @@ print(1j / 2) print((1j / 2j).real) print(1j / (1 + 2j)) ans = 0j ** 0; print("%.5g %.5g" % (ans.real, ans.imag)) +ans = 0j ** 1; print("%.5g %.5g" % (ans.real, ans.imag)) ans = 0j ** 0j; print("%.5g %.5g" % (ans.real, ans.imag)) ans = 1j ** 2.5; print("%.5g %.5g" % (ans.real, ans.imag)) ans = 1j ** 2.5j; print("%.5g %.5g" % (ans.real, ans.imag)) @@ -94,6 +95,10 @@ except ZeroDivisionError: print("ZeroDivisionError") # zero division via power +try: + 0j ** -1 +except ZeroDivisionError: + print("ZeroDivisionError") try: 0j ** 1j except ZeroDivisionError: diff --git a/tests/float/float1.py b/tests/float/float1.py index 0e115032b69783606b53d802882917ea1d8db0ed..93f6f014c4b664656ac2b65ff026c4f9a695cd04 100644 --- a/tests/float/float1.py +++ b/tests/float/float1.py @@ -75,6 +75,11 @@ try: except ZeroDivisionError: print("ZeroDivisionError") +try: + 0.0 ** -1 +except ZeroDivisionError: + print("ZeroDivisionError") + # unsupported unary ops try: diff --git a/tests/float/int_divzero.py b/tests/float/int_divzero.py index b037dd8c7bfa83347ecb01e68012b580c9fa7377..b311a1dbcf6c9e151fc5b8ccad953b6732ae3256 100644 --- a/tests/float/int_divzero.py +++ b/tests/float/int_divzero.py @@ -2,3 +2,8 @@ try: 1 / 0 except ZeroDivisionError: print("ZeroDivisionError") + +try: + 0 ** -1 +except ZeroDivisionError: + print("ZeroDivisionError")