Asserts that two records are equal. Pretty crude for now.
(a, b)
| 98 | |
| 99 | |
| 100 | def assert_equal_records(a, b): |
| 101 | """ |
| 102 | Asserts that two records are equal. |
| 103 | |
| 104 | Pretty crude for now. |
| 105 | |
| 106 | """ |
| 107 | assert_equal(a.dtype, b.dtype) |
| 108 | for f in a.dtype.names: |
| 109 | (af, bf) = (operator.getitem(a, f), operator.getitem(b, f)) |
| 110 | if not (af is masked) and not (bf is masked): |
| 111 | assert_equal(operator.getitem(a, f), operator.getitem(b, f)) |
| 112 | |
| 113 | |
| 114 | def assert_equal(actual, desired, err_msg=''): |
no test coverage detected
searching dependent graphs…