Skip to content

Commit

Permalink
add pop test
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrd committed Nov 13, 2022
1 parent b15000a commit 91924bb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_PDHandle.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,3 +389,11 @@ def test__len__():
assert len(p) == 1
assert len(p.at("1")) == 1
assert len(p.at("1/2")) == 2


def test_pop():
p = pd({"1": {"2": [3, 1]}, "4": 4})
assert p.pop("1") == {"2": [3, 1]}
assert p.get() == {"4": 4}
assert p.pop("1") is None
assert p.pop("1", 2) == 2

0 comments on commit 91924bb

Please sign in to comment.