def test_invalid_remove(base_group): """When I try to remove a group not in the groups It should raise an exception """ gr = base_group tab = Table() with pytest.raises(ValueError): tab.remove_group(gr)
def test_num_remaining(base_group): """When a table is modified It should alter self.remaining using count and capacity """ gr = base_group tab = Table() tab.add_group(gr) assert tab.remaining == 10 tab.remove_group(gr) assert tab.remaining == 12
def test_remove_group_from_table(base_group): """When I remove a group from the table It should remove the group from groups and it should decrement the count """ gr = base_group tab1 = Table() tab1.add_group(gr) tab1.remove_group(gr) assert tab1.count == 0 assert tab1.groups == []