From 325c4473a5b760a2251a6e0e418abf218741fb1f Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Mon, 6 Mar 2017 15:46:01 +0100 Subject: [PATCH] tests/float/complex1: Split out intbig test. --- tests/float/complex1.py | 3 --- tests/float/complex1_intbig.py | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 tests/float/complex1_intbig.py diff --git a/tests/float/complex1.py b/tests/float/complex1.py index 1031111f37..8c8d285e1a 100644 --- a/tests/float/complex1.py +++ b/tests/float/complex1.py @@ -49,9 +49,6 @@ print(float('nan') * 1j) print(float('inf') * (1 + 1j)) print(float('-inf') * (1 + 1j)) -# convert bignum to complex on rhs -ans = 1j + (1 << 70); print("%.5g %.5g" % (ans.real, ans.imag)) - # can't assign to attributes try: (1j).imag = 0 diff --git a/tests/float/complex1_intbig.py b/tests/float/complex1_intbig.py new file mode 100644 index 0000000000..ed2390bbaf --- /dev/null +++ b/tests/float/complex1_intbig.py @@ -0,0 +1,4 @@ +# test basic complex number functionality + +# convert bignum to complex on rhs +ans = 1j + (1 << 70); print("%.5g %.5g" % (ans.real, ans.imag))