def cleon_with_friends():
    cleon = Pupil.cleon()
    cassidy = Pupil.cassidy()
    flynn = Pupil.flynn()
    cleon.befriend(cassidy)
    cleon.befriend(flynn)
    return cleon
def test_staticmethod_passed_with_passed_grades():
    assert Pupil.passed('E') == True
    assert Pupil.passed('Exceptional') == True
    assert Pupil.passed('G') == True
    assert Pupil.passed('Good') == True
    assert Pupil.passed('A') == True
    assert Pupil.passed('Acceptable') == True
Пример #3
0
import yaml
from python_features_hp.magic_universe import CastleKilmereMember, Pupil

if __name__ == '__main__':
    with open('config.yaml', 'r') as c:
        config = yaml.load(c)
        bromley = CastleKilmereMember(**config['bromley'])
        print('bromley: ', bromley)

        cleon = Pupil(**config['cleon'])
        print('cleon: ', cleon)
def adrien():
    return Pupil.adrien()
def cassidy():
    cassidy = Pupil.cassidy()
    cassidy.add_trait('highly intelligent')
    return cassidy
def cleon():
    return Pupil.cleon()
def test_staticmethod_passed_default_return_value():
    assert Pupil.passed('D') == False
def test_staticmethod_passed_with_not_passed_grades():
    assert Pupil.passed('P') == False
    assert Pupil.passed('Poor') == False
    assert Pupil.passed('H') == False
    assert Pupil.passed('Horrible') == False