Skip to content

Commit f8a7c8c

Browse files
committed
address review: +tests for array_reconstructor
1 parent c3489f2 commit f8a7c8c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Lib/test/test_array.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,15 @@ def test_numbers(self):
197197
(['d'], IEEE_754_DOUBLE_LE, '<dddd',
198198
[9006104071832581.0, float('inf'), float('-inf'), -0.0]),
199199
(['d'], IEEE_754_DOUBLE_BE, '>dddd',
200-
[9006104071832581.0, float('inf'), float('-inf'), -0.0])
200+
[9006104071832581.0, float('inf'), float('-inf'), -0.0]),
201+
(['f'], IEEE_754_FLOAT_COMPLEX_LE, '<ffff',
202+
[16711938.0j, float('inf'), complex('1-infj'), -0.0]),
203+
(['f'], IEEE_754_FLOAT_COMPLEX_BE, '>ffff',
204+
[16711938.0j, float('inf'), complex('1-infj'), -0.0]),
205+
(['d'], IEEE_754_DOUBLE_COMPLEX_LE, '<dddd',
206+
[9006104071832581.0j, float('inf'), complex('1-infj'), -0.0]),
207+
(['d'], IEEE_754_DOUBLE_COMPLEX_BE, '>dddd',
208+
[9006104071832581.0j, float('inf'), complex('1-infj'), -0.0])
201209
)
202210
for testcase in testcases:
203211
valid_typecodes, mformat_code, struct_fmt, values = testcase

0 commit comments

Comments
 (0)