Commit 5a05f7a
Benjamin Moody
test_physical_conversion: make tests more stringent.
- Test that Record.adc works when n_sig is not set. (Previously, this
didn't work with expanded=True.)
- Test that Record.adc handles NaN by mapping it to the correct
invalid-sample value. (Previously, this didn't work with
expanded=False and inplace=True.) Use multiple formats to test
that this takes the format into account.
Furthermore, the previous code relied on implementation-defined
behavior to handle NaN, which normally results in a RuntimeWarning.
Within the test suite, we set the numpy error handling mode to
"raise", so such implementation-defined conversions actually result in
a FloatingPointError.1 parent a901163 commit 5a05f7a
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1053 | 1053 | | |
1054 | 1054 | | |
1055 | 1055 | | |
| 1056 | + | |
1056 | 1057 | | |
1057 | | - | |
| 1058 | + | |
1058 | 1059 | | |
1059 | 1060 | | |
1060 | 1061 | | |
1061 | 1062 | | |
1062 | 1063 | | |
| 1064 | + | |
1063 | 1065 | | |
1064 | 1066 | | |
1065 | 1067 | | |
1066 | 1068 | | |
1067 | 1069 | | |
1068 | | - | |
1069 | 1070 | | |
1070 | 1071 | | |
1071 | 1072 | | |
| |||
1081 | 1082 | | |
1082 | 1083 | | |
1083 | 1084 | | |
1084 | | - | |
1085 | 1085 | | |
1086 | 1086 | | |
1087 | 1087 | | |
| |||
1108 | 1108 | | |
1109 | 1109 | | |
1110 | 1110 | | |
1111 | | - | |
| 1111 | + | |
1112 | 1112 | | |
1113 | 1113 | | |
1114 | 1114 | | |
| |||
0 commit comments