summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/float/complex1.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/float/complex1.py b/tests/float/complex1.py
index 027d12583..fed65d5d5 100644
--- a/tests/float/complex1.py
+++ b/tests/float/complex1.py
@@ -51,6 +51,12 @@ 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
+except AttributeError:
+ print('AttributeError')
+
# can't convert rhs to complex
try:
1j + []