(key_strategy=None, value_strategy=None)
| 238 | |
| 239 | |
| 240 | def dictionary_types(key_strategy=None, value_strategy=None): |
| 241 | if key_strategy is None: |
| 242 | key_strategy = signed_integer_types |
| 243 | if value_strategy is None: |
| 244 | value_strategy = st.one_of( |
| 245 | bool_type, |
| 246 | integer_types, |
| 247 | st.sampled_from([pa.float32(), pa.float64()]), |
| 248 | binary_type, |
| 249 | string_type, |
| 250 | fixed_size_binary_type, |
| 251 | ) |
| 252 | return st.builds(pa.dictionary, key_strategy, value_strategy) |
| 253 | |
| 254 | |
| 255 | @st.composite |