def test_bad_kwarg_get_data(): # For more information on why you would want to pass an unknown keyword # argument, see Github issue #745. amodel = NAM() data = amodel.get_data(_latitude, _longitude, _start, _end, bad_kwarg=False) assert not data.empty
def test_vert_level(): amodel = NAM() vert_level = 5000 data = amodel.get_processed_data(_latitude, _longitude, _start, _end, vert_level=vert_level)
def test_how_kwarg_get_processed_data(): amodel = NAM() data = amodel.get_processed_data(_latitude, _longitude, _start, _end, how='clearsky_scaling') assert not data.empty
def test_vert_level(): with pytest.warns(pvlibDeprecationWarning): amodel = NAM() vert_level = 5000 amodel.get_processed_data(_latitude, _longitude, _start, _end, vert_level=vert_level)
def test_how_kwarg_get_processed_data(): with pytest.warns(pvlibDeprecationWarning): amodel = NAM() data = amodel.get_processed_data(_latitude, _longitude, _start, _end, how='clearsky_scaling') assert not data.empty
def test_model_define(): models = [ type(NAM()), type(GFS()), type(HRRR()), type(RAP()), type(NDFD()) ] model = PM.model_define() assert (type(model) in models) == True
def test_bad_kwarg_get_processed_data(): # For more information on why you would want to pass an unknown keyword # argument, see Github issue #745. with pytest.warns(pvlibDeprecationWarning): amodel = NAM() data = amodel.get_processed_data(_latitude, _longitude, _start, _end, bad_kwarg=False) assert not data.empty
def model_define(self): """Defines the PVLib Model which is to be instantiated. Returns: :mod: `pvlib` :class: `ForecastModel` """ if self.model_name == 'GFS': return GFS() elif self.model_name == 'HRRR': return HRRR() elif self.model_name == 'RAP': return RAP() elif self.model_name == 'NDFD': return NDFD() else: return NAM()
def test_datetime(): amodel = NAM() start = datetime.now() end = start + timedelta(days=1) data = amodel.get_processed_data(_latitude, _longitude, start, end)
def test_datetime(): with pytest.warns(pvlibDeprecationWarning): amodel = NAM() start = datetime.now(tz=timezone.utc) end = start + timedelta(days=1) amodel.get_processed_data(_latitude, _longitude, start, end)