Skip to content

Commit

Permalink
Added testcases to DictView tests
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
  • Loading branch information
andy-maier committed Apr 12, 2021
1 parent 21d609d commit b20ca47
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion tests/unittest/test_dict_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,20 @@ def __ne__(self, other):
),
None, None, True
),
(
"From DictView of empty dict as positional arg",
dict(
init_args=(DictView({}),),
init_kwargs={},
exp_dict=DictView({}),
verify_order=True,
),
None, None, True
),

# Non-empty original dictionaries
(
"From dict as positional arg",
"From non-empty dict as positional arg",
dict(
init_args=({'Dog': 'Cat', 'Budgie': 'Fish'},),
init_kwargs={},
Expand All @@ -104,6 +114,16 @@ def __ne__(self, other):
),
None, None, True
),
(
"From DictView of non-empty dict as positional arg",
dict(
init_args=(DictView({'Dog': 'Cat', 'Budgie': 'Fish'}),),
init_kwargs={},
exp_dict=DictView({'Dog': 'Cat', 'Budgie': 'Fish'}),
verify_order=False,
),
None, None, True
),

# Error cases with inputs that are invalid for the view but would be valid
# for a real dictionary
Expand Down

0 comments on commit b20ca47

Please sign in to comment.