File: merge_dicts.txt

package info (click to toggle)
python-hypothesis 6.148.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,408 kB
  • sloc: python: 63,888; ruby: 1,107; sh: 266; makefile: 42; javascript: 6
file content (23 lines) | stat: -rw-r--r-- 832 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# This test code was written by the `hypothesis.extra.ghostwriter` module
# and is provided under the Creative Commons Zero public domain dedication.

import collections.abc
import example_code.future_annotations
from collections import ChainMap
from hypothesis import given, strategies as st


@given(
    map1=st.one_of(
        st.dictionaries(keys=st.text(), values=st.integers()).map(ChainMap),
        st.dictionaries(keys=st.text(), values=st.integers()),
    ),
    map2=st.one_of(
        st.dictionaries(keys=st.text(), values=st.integers()).map(ChainMap),
        st.dictionaries(keys=st.text(), values=st.integers()),
    ),
)
def test_fuzz_merge_dicts(
    map1: collections.abc.Mapping[str, int], map2: collections.abc.Mapping[str, int]
) -> None:
    example_code.future_annotations.merge_dicts(map1=map1, map2=map2)