Skip to content

Commit

Permalink
Adds test
Browse files Browse the repository at this point in the history
  • Loading branch information
spacether committed Jul 20, 2023
1 parent ac4c5c9 commit e2610f4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/test_immutabledict.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@


class TestImmutableDict:
def test_covariance(self):
assert immutabledict.__parameters__[0].__covariant__ is False
assert immutabledict.__parameters__[1].__covariant__ is True

def test_cannot_assign_value(self):
with pytest.raises(AttributeError):
immutabledict().setitem("key", "value")
Expand Down Expand Up @@ -37,11 +41,6 @@ def test_contains_not_existing(self):
immutable_dict = immutabledict({"a": "value"})
assert "b" not in immutable_dict

def test_copy(self):
original = immutabledict({"a": "value"})
copy = original.copy()
assert original == copy

def test_iter(self):
immutable_dict = immutabledict({"a": "value", "b": "other_value"})
itered_keys = {x for x in immutable_dict}
Expand Down

0 comments on commit e2610f4

Please sign in to comment.