MCPcopy Index your code
hub / github.com/pydata/xarray / assert_no_warnings

Function assert_no_warnings

xarray/tests/__init__.py:316–321  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

314
315@contextmanager
316def 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

Calls 1

format_recordFunction · 0.85

Used in the wild real call sites across dependent graphs

searching dependent graphs…