MCPcopy Create free account
hub / github.com/pydata/xarray / test_invalid

Method test_invalid

xarray/tests/test_strategies.py:242–247  ·  view source on GitHub ↗
(self, data)

Source from the content-addressed store, hash-verified

240class TestUniqueSubsetOf:
241 @given(st.data())
242 def test_invalid(self, data):
243 with pytest.raises(TypeError, match="must be an Iterable or a Mapping"):
244 data.draw(unique_subset_of(0)) # type: ignore[call-overload]
245
246 with pytest.raises(ValueError, match="length-zero object"):
247 data.draw(unique_subset_of({}))
248
249 @given(st.data(), dimension_sizes(min_dims=1))
250 def test_mapping(self, data, dim_sizes):

Callers

nothing calls this directly

Calls 1

unique_subset_ofFunction · 0.90

Tested by

no test coverage detected