import sys sys.path.append('../') import yaml from magical_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) lissy = Pupil(**config['lissy']) print('lissy: ', lissy) luke = Pupil(**config['luke']) print('luke: ', luke)
def test_init_raises_exception_with_missing_arguments(): with pytest.raises(TypeError): bromley = CastleKilmereMember()
def bromley(): bromley = CastleKilmereMember('Bromley Huckabee', 1956, 'male') return bromley
def bromley_with_traits(): bromley = CastleKilmereMember('Bromley Huckabee', 1956, 'male') bromley.add_trait('kind') bromley.add_trait('wild') bromley.add_trait('mean', False) return bromley