from pythonic_garage_band.pythonic_garage_band import Band, Musician, Guitarist, Bassist, Drummer
import pytest


def test_version():
    assert __version__ == '0.1.0'


## preparing the data

mike = Guitarist('mike')
carlos = Drummer('carlos')
john = Bassist('john')

maroon5 = Band('maroon5')
maroon5.add_members(mike)
maroon5.add_members(carlos)
maroon5.add_members(john)

#########################################################################
########## Tests ###############
#########################################################################


def test_to_list(cls):
    expected = [mike, carlos, john]
    actual = maroon5.to_list()
    assert actual == expected


def test_play_solo():
Exemple #2
0
    assert __version__ == '0.1.0'


# @pytest.mark.skip(reason='Testing Count')
# def test_play_solos():
#     ali = Band.Guitarist('ali') # preparing data
#     ahmad = Band.Drummer('ahmad')
#     soso = Band.Bassist('soso')
#     expected = "ali play solo\nahmad play solo\nsoso play solo\n"
#     actual = soso.play_solos()
#     assert actual == expected
aziz = Guitarist('Aziz')
saleh = Drummer('Saleh')
emad = Bassist('Emad')
tarbanin = Band('tarbanin')
tarbanin.add_members(aziz)
tarbanin.add_members(saleh)
tarbanin.add_members(emad)


# @pytest.fixture
# def prep_data():
#     aziz = Band.Guitarist('Aziz') # preparing data
#     saleh = Band.Drummer('Saleh')
#     emad = Band.Bassist('Emad')
#     #preparing data
#     return {'aziz':aziz, 'saleh':saleh, 'emad':emad}
def test_to_list():
    expected = [aziz, saleh, emad]
    actual = tarbanin.to_list()
    assert actual == expected