Closed odow closed 3 years ago
(loredash) oscar@Oscars-MacBook-Pro loredash % python -m pytest =========================================================================================== test session starts ============================================================================================ platform darwin -- Python 3.8.10, pytest-6.2.4, py-1.10.0, pluggy-0.13.1 django: settings: loredash.settings (from ini) rootdir: /Users/oscar/Documents/Projects/lore2/lore/loredash, configfile: pytest.ini plugins: django-4.3.0 collected 14 items tests/test_forecasts.py F.... [ 35%] tests/test_mediator.py .F. [ 57%] tests/tests.py ...... [100%] ================================================================================================= FAILURES ================================================================================================= ________________________________________________________________________________________ test_forecaster_from_plant ________________________________________________________________________________________ @pytest.mark.django_db def test_forecaster_from_plant(): forecaster = forecasts.SolarForecast( > plant.plant_design['latitude'], plant.plant_design['longitude'], plant.plant_design['timezone_string'], plant.plant_design['elevation'], ) E AttributeError: module 'mediation.plant' has no attribute 'plant_design' tests/test_forecasts.py:32: AttributeError ___________________________________________________________________________________________ test_get_weather_df ____________________________________________________________________________________________ def test_get_weather_df(): m = mediator.Mediator( params = mediator.mediator_params, plant_config_path = PARENT_DIR + "/data/plant_config.json", > plant_design = plant.plant_design, weather_file = PARENT_DIR + "/data/daggett_ca_34.865371_-116.783023_psmv3_60_tmy.csv", update_interval = datetime.timedelta(seconds = 5), ) E AttributeError: module 'mediation.plant' has no attribute 'plant_design' tests/test_mediator.py:46: AttributeError ============================================================================================= warnings summary ============================================================================================= ../../../../../opt/anaconda3/envs/loredash/lib/python3.8/site-packages/pyutilib/misc/import_file.py:11 /Users/oscar/opt/anaconda3/envs/loredash/lib/python3.8/site-packages/pyutilib/misc/import_file.py:11: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import imp -- Docs: https://docs.pytest.org/en/stable/warnings.html ========================================================================================= short test summary info ========================================================================================== FAILED tests/test_forecasts.py::test_forecaster_from_plant - AttributeError: module 'mediation.plant' has no attribute 'plant_design' FAILED tests/test_mediator.py::test_get_weather_df - AttributeError: module 'mediation.plant' has no attribute 'plant_design' ============================================================================ 2 failed, 12 passed, 1 warning in 63.41s (0:01:03) ============================================================================
I have a fix incoming.