(key_strategy=None, value_strategy=None)
| 219 | |
| 220 | |
| 221 | def dictionary_types(key_strategy=None, value_strategy=None): |
| 222 | if key_strategy is None: |
| 223 | key_strategy = signed_integer_types |
| 224 | if value_strategy is None: |
| 225 | value_strategy = st.one_of( |
| 226 | bool_type, |
| 227 | integer_types, |
| 228 | st.sampled_from([pa.float32(), pa.float64()]), |
| 229 | binary_type, |
| 230 | string_type, |
| 231 | fixed_size_binary_type, |
| 232 | ) |
| 233 | return st.builds(pa.dictionary, key_strategy, value_strategy) |
| 234 | |
| 235 | |
| 236 | @st.composite |