Beispiel #1
0
def test_guiterist():
    john = Guitarist("John Lennon")
    assert john.name == "John Lennon"
    assert john.get_instrument() == "Guitar"
    assert john.play_solo() == "Sympathy for the Devil"
    assert john.__str__() == "John Lennon plays Guitar"
    assert john.__repr__() == "Musician(John Lennon,Guitar)"
def test_guitarist_str():
    moony = Guitarist("Moony")
    actual = moony.__str__()
    expected = "this is the string inside Musician superclass with instance Moony"
    assert expected == actual