()
| 314 | |
| 315 | @contextmanager |
| 316 | def assert_no_warnings(): |
| 317 | with warnings.catch_warnings(record=True) as record: |
| 318 | yield record |
| 319 | assert len(record) == 0, ( |
| 320 | f"Got {len(record)} unexpected warning(s): {[format_record(r) for r in record]}" |
| 321 | ) |
| 322 | |
| 323 | |
| 324 | # Internal versions of xarray's test functions that validate additional |
searching dependent graphs…