def test_one_fire(self, reset_config, monkeypatch): monkeypatch_arl_profiler(monkeypatch) fm = FiresManager() fm.met = MET_INFO fm.load({"fires": [FIRE]}) localmet.run(fm) assert _ARLP_ARGS == (MET_INFO['files'], ) assert _ARLP_KWARGS == { 'time_step': defaults._DEFAULTS['localmet']['time_step'] } assert _ARLP_PROFILE_CALL_ARGS == [ (datetime.datetime(2015, 1, 21, 0, 0), datetime.datetime(2015, 1, 22, 0, 0), [{ 'latitude': 45.0, 'longitude': -119.0 }, { 'latitude': 47.415, 'longitude': -121.42 }]) ]
def test_fire_no_activity(self, reset_config, monkeypatch): monkeypatch_arl_profiler(monkeypatch) fm = FiresManager() fm.met = MET_INFO fm.load({"fires": [FIRE_NO_ACTIVITY]}) with raises(ValueError) as e_info: localmet.run(fm) assert e_info.value.args[0] == localmet.NO_ACTIVITY_ERROR_MSG
def test_no_fires(self, reset_config, monkeypatch): monkeypatch_arl_profiler(monkeypatch) fm = FiresManager() fm.met = MET_INFO fm.load({"fires": []}) with raises(RuntimeError) as e_info: localmet.run(fm) assert e_info.value.args[0] == localmet.NO_START_OR_END_ERROR_MSG
def test_no_fires(self, reset_config, monkeypatch): monkeypatch_arl_profiler(monkeypatch) fm = FiresManager() fm.met = MET_INFO fm.load({"fires": []}) localmet.run(fm) assert _ARLP_ARGS == (MET_INFO['files'], ) assert _ARLP_KWARGS == { 'time_step': defaults._DEFAULTS['localmet']['time_step'] } assert _ARLP_PROFILE_CALL_ARGS == []