File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -370,10 +370,14 @@ def test_iterable_str_to_array_1d_complex_4(self) -> None:
370
370
self .assertEqual (a1 .dtype , np .dtype (complex ))
371
371
self .assertEqual (a1 .tolist (), [complex ('-0+infj' ), (0j )])
372
372
373
- # NOTE: this causes a seg fault
374
- # def test_iterable_str_to_array_1d_d4(self) -> None:
375
- # with self.assertRaises(ValueError):
376
- # a1 = iterable_str_to_array_1d(['-2+1.2j', '1.5+-4.2j'], complex)
373
+ def test_iterable_str_to_array_1d_complex_5 (self ) -> None :
374
+ with self .assertRaises (ValueError ):
375
+ a1 = iterable_str_to_array_1d (['-2+1.2j' , '1.5+-4.2j' ], complex )
376
+
377
+ def test_iterable_str_to_array_1d_complex_6 (self ) -> None :
378
+ # NOTE: malformed complex raise Exception as expected
379
+ with self .assertRaises (ValueError ):
380
+ a1 = iterable_str_to_array_1d (['-2+1.2asdfj' , '1.5wer4.2j' ], complex )
377
381
378
382
#---------------------------------------------------------------------------
379
383
You can’t perform that action at this time.
0 commit comments