def harmony_band3(): harmony = Band ( "harmony", [Drummer("Sivamani"), Guitarist("Surya"), Bassist("Rehman")] ) return harmony
def some_band(): assert some_band.name == "Nirvana" nirvana = Band("Nirvana", [Guitarist("Curt Kobian"), Bassist("Kris Nov"), Drummer("Dave") ]) return nirvana
def some_band(): nirvana = Band("Nirvana", [Guitarist("Curt Kobain"), Bassist("Kris, Novoselic"), Drummer("Dave Grohl")]) return nirvana
def test_band_name(): nirvana = Band("Nirvana", []) assert nirvana.name == "Nirvana"
def test_to_list(): assert Band.to_list() == [] Band("The Nobodies", []) assert len(Band.to_list()) == 1
def one_band(): some_band = Band( "Nirvana", [Guitarist("Kurt Cobain"), Bassist("Krist Novoselic"), Drummer("Dave Grohl"),], ) return some_band
def test_band_to_list(): test_band1 = Band("test",[Guitarist("test1")]); assert len(test_band1.to_list())>0
def test_band_play_solo(): test_band = Band("test",[Guitarist("test1"),Bassist("test2")]); assert test_band.play_solos() == ["test1 Playing solo guitar","test2 Playing solo bass"]
def test_band_members(): test_band = Band("test",[Guitarist("test1"),Bassist("test2")]); assert test_band.members[0].name == "test1" assert test_band.members[0].instrument == "Guitar" assert test_band.members[1].name == "test2" assert test_band.members[1].instrument == "Bass"
def test_band_name(): test_band = Band("test"); assert test_band.name == "test"
def test_band_list(): assert Band.to_list() == [] slipknot = Band('Slipknot', '[Corey, James]') assert len(Band.to_list()) == 1