Asserts that two records are equal. Pretty crude for now.
(a, b)
| 91 | |
| 92 | |
| 93 | def assert_equal_records(a, b): |
| 94 | """ |
| 95 | Asserts that two records are equal. |
| 96 | |
| 97 | Pretty crude for now. |
| 98 | |
| 99 | """ |
| 100 | assert_equal(a.dtype, b.dtype) |
| 101 | for f in a.dtype.names: |
| 102 | (af, bf) = (operator.getitem(a, f), operator.getitem(b, f)) |
| 103 | if not (af is masked) and not (bf is masked): |
| 104 | assert_equal(operator.getitem(a, f), operator.getitem(b, f)) |
| 105 | return |
| 106 | |
| 107 | |
| 108 | def assert_equal(actual, desired, err_msg=''): |
no test coverage detected