Exemplo n.º 1
0
def test_ModelChain___repr__(system, location):

    strategy = 'south_at_latitude_tilt'

    mc = ModelChain(system, location, orientation_strategy=strategy)

    assert mc.__repr__() == ('ModelChain for: PVSystem with tilt:32.2 and '+
    'azimuth: 180 with Module: None and Inverter: None '+
    'orientation_startegy: south_at_latitude_tilt clearsky_model: '+
    'ineichen transposition_model: haydavies solar_position_method: '+
    'nrel_numpy airmass_model: kastenyoung1989')
Exemplo n.º 2
0
def test_ModelChain___repr__(system, location):

    strategy = 'south_at_latitude_tilt'

    mc = ModelChain(system,
                    location,
                    orientation_strategy=strategy,
                    name='my mc')

    expected = 'ModelChain: \n  name: my mc\n  orientation_strategy: south_at_latitude_tilt\n  clearsky_model: ineichen\n  transposition_model: haydavies\n  solar_position_method: nrel_numpy\n  airmass_model: kastenyoung1989\n  dc_model: sapm\n  ac_model: snlinverter\n  aoi_model: sapm_aoi_loss\n  spectral_model: sapm_spectral_loss\n  temp_model: sapm_temp\n  losses_model: no_extra_losses'

    assert mc.__repr__() == expected
Exemplo n.º 3
0
def test_ModelChain___repr__():
    system = PVSystem()
    location = Location(32.2, -111, altitude=700)
    strategy = 'south_at_latitude_tilt'

    mc = ModelChain(system, location, orientation_strategy=strategy)

    # the || accounts for the coercion of 'None' to None
    assert mc.__repr__() == ('ModelChain for: PVSystem with tilt:32.2 and '+
    'azimuth: 180 with Module: None and Inverter: None '+
    'orientation_startegy: south_at_latitude_tilt clearsky_model: '+
    'ineichentransposition_model: haydavies solar_position_method: '+
    'nrel_numpyairmass_model: kastenyoung1989')
Exemplo n.º 4
0
def test_ModelChain___repr__():
    system = PVSystem()
    location = Location(32.2, -111, altitude=700)
    strategy = 'south_at_latitude_tilt'

    mc = ModelChain(system, location, orientation_strategy=strategy)

    # the || accounts for the coercion of 'None' to None
    assert mc.__repr__() == (
        'ModelChain for: PVSystem with tilt:32.2 and ' +
        'azimuth: 180 with Module: None and Inverter: None ' +
        'orientation_startegy: south_at_latitude_tilt clearsky_model: ' +
        'ineichentransposition_model: haydavies solar_position_method: ' +
        'nrel_numpyairmass_model: kastenyoung1989')
Exemplo n.º 5
0
def test_ModelChain___repr__(system, location, strategy, strategy_str):

    mc = ModelChain(system,
                    location,
                    orientation_strategy=strategy,
                    name='my mc')

    expected = '\n'.join([
        'ModelChain: ', '  name: my mc',
        '  orientation_strategy: ' + strategy_str,
        '  clearsky_model: ineichen', '  transposition_model: haydavies',
        '  solar_position_method: nrel_numpy',
        '  airmass_model: kastenyoung1989', '  dc_model: sapm',
        '  ac_model: snlinverter', '  aoi_model: sapm_aoi_loss',
        '  spectral_model: sapm_spectral_loss',
        '  temperature_model: sapm_temp', '  losses_model: no_extra_losses'
    ])

    assert mc.__repr__() == expected
Exemplo n.º 6
0
def test_ModelChain___repr__(system, location, strategy, strategy_str):

    mc = ModelChain(system, location, orientation_strategy=strategy,
                    name='my mc')

    expected = '\n'.join([
        'ModelChain: ',
        '  name: my mc',
        '  orientation_strategy: ' + strategy_str,
        '  clearsky_model: ineichen',
        '  transposition_model: haydavies',
        '  solar_position_method: nrel_numpy',
        '  airmass_model: kastenyoung1989',
        '  dc_model: sapm',
        '  ac_model: snlinverter',
        '  aoi_model: sapm_aoi_loss',
        '  spectral_model: sapm_spectral_loss',
        '  temp_model: sapm_temp',
        '  losses_model: no_extra_losses'
    ])

    assert mc.__repr__() == expected