def test_rm_inv_item__stackable__removed_partial_stack__letter_remains(vials5): pi = PlayerInventory(10) pi.add_inv_item(vials5) pi.rm_inv_item(vials5, 2) assert not pi.is_empty() assert vials5 in pi.entities assert "a" in pi.item_dict
def test_rm_inv_item__nonstackable__pops_letter(plunger): pi = PlayerInventory(10) pi.add_inv_item(plunger) pi.rm_inv_item(plunger) assert "a" not in pi.item_dict assert plunger not in pi.entities
def test_rm_inv_item__stackable__removed_full_stack__pops_letter(vials5): pi = PlayerInventory(10) pi.add_inv_item(vials5) pi.rm_inv_item(vials5) assert pi.is_empty() assert vials5 not in pi.entities
def test_rm_inv_item__item_dne__returns_None(dagger): pi = PlayerInventory(10) result = pi.rm_inv_item(dagger) assert result is None