Exemple #1
0
def one_band():
    some_band = Band(
        "Nirvana",
        [
            Guitarist("Kurt Cobain"),
            Bassist("Krist Novoselic"),
            Drummer("Dave Grohl"),
        ],
    )
    return some_band
Exemple #2
0
def test_guitarist():
    jimi = Guitarist("Jimi Hendrix")
    assert jimi.name == "Jimi Hendrix"
    assert jimi.get_instrument() == "guitar"
Exemple #3
0
def test_guitarist_repr():
    joan = Guitarist("Joan Jett")
    actual = repr(joan)
    expected = "Guitarist instance. Name = Joan Jett"
    assert actual == expected
Exemple #4
0
def test_guitarist_str():
    joan = Guitarist("Joan Jett")
    actual = str(joan)
    expected = "My name is Joan Jett and I play guitar"
    assert actual == expected
Exemple #5
0
def test_GuitarName():
    actual = Guitarist("jonny").name
    expected = "jonny"
    assert expected == actual