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

Class DummyArray

xarray/tests/test_backends_common.py:18–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16
17
18class DummyArray:
19 def __init__(self, failures):
20 self.failures = failures
21
22 def __getitem__(self, key):
23 if self.failures:
24 self.failures -= 1
25 raise DummyFailure
26 return "success"
27
28
29def test_robust_getitem() -> None:

Callers 1

test_robust_getitemFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_robust_getitemFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…