Generates arbitrary valid attributes dictionaries for xarray objects. The generated dictionaries can potentially be recursive. Requires the hypothesis package to be installed. See Also -------- :ref:`testing.hypothesis`_
()
| 230 | |
| 231 | |
| 232 | def attrs() -> st.SearchStrategy[Mapping[Hashable, Any]]: |
| 233 | """ |
| 234 | Generates arbitrary valid attributes dictionaries for xarray objects. |
| 235 | |
| 236 | The generated dictionaries can potentially be recursive. |
| 237 | |
| 238 | Requires the hypothesis package to be installed. |
| 239 | |
| 240 | See Also |
| 241 | -------- |
| 242 | :ref:`testing.hypothesis`_ |
| 243 | """ |
| 244 | return st.recursive( |
| 245 | st.dictionaries(_attr_keys, _attr_values), |
| 246 | lambda children: st.dictionaries(_attr_keys, children), |
| 247 | max_leaves=3, |
| 248 | ) |
| 249 | |
| 250 | |
| 251 | ATTRS = attrs() |
no outgoing calls
no test coverage detected
searching dependent graphs…