Skip to content

Commit

Permalink
Moves copy test
Browse files Browse the repository at this point in the history
  • Loading branch information
spacether committed Jul 20, 2023
1 parent 830aece commit 4141169
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions tests/test_immutabledict.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@ def test_cannot_assign_value(self):
with pytest.raises(AttributeError):
immutabledict().setitem("key", "value")

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


def test_from_keys(self):
keys = ("a", "b", "c")
immutable_dict = immutabledict.fromkeys(keys)
Expand Down Expand Up @@ -48,6 +41,12 @@ 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
assert id(original) != id(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 4141169

Please sign in to comment.