예제 #1
0
def test_set_unidentified_rats_garbage_in_list(rescue_plain_fx: Rescue):
    """
    Verifies a ValueError is raised if the list passed to Rat.unidentified_Rats contains
    illegal values
    """
    garbage = [12, -42.2, None]
    with pytest.raises(ValueError):
        rescue_plain_fx.unidentified_rats = garbage
예제 #2
0
def test_set_unidentified_rats_incorrect_type(rescue_plain_fx: Rescue):
    """
    Verifies a TypeError is raised if another type other than list is passed.
    """
    with pytest.raises(TypeError):
        rescue_plain_fx.unidentified_rats = 'Snozzberry, Wonka, Doc'