Skip to content

Commit

Permalink
Add test for indexing
Browse files Browse the repository at this point in the history
  • Loading branch information
kiendang committed Oct 19, 2023
1 parent 57a49c9 commit 8bab166
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/syft/tests/syft/types/dicttuple_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ def test_should_iter_over_value(dict_tuple: DictTuple) -> None:
assert values == [1, 2]


@pytest.mark.parametrize("dict_tuple", TEST_CASES)
def test_indexing(dict_tuple: DictTuple) -> None:
assert dict_tuple[0] == 1
assert dict_tuple[1] == 2
assert dict_tuple["x"] == 1
assert dict_tuple["y"] == 2


@pytest.mark.parametrize("dict_tuple", TEST_CASES)
def test_convert_to_other_iterable_types(dict_tuple: DictTuple) -> None:
assert list(dict_tuple) == [1, 2]
Expand Down

0 comments on commit 8bab166

Please sign in to comment.