thegridelectric / gw-scada-spaceheat-python

GridWorks SCADA for space heating
MIT License
5 stars 2 forks source link

Allow tests to run on the pi. #115

Closed anschweitzer closed 2 years ago

anschweitzer commented 2 years ago

The pi needs specific passwords for local mqtt broker and possibly other settings. This change makes tests by default get their environment from test/.env-gw-spaceheat-test-pi (named not accidentally clash with some other .env file a user might have created). A test dotenv file suitable for using with default pi configuration is also provided. Tests can be run from the virtual environment with:

cd gw-scada-spaceheat-python
export PYTHONPATH=gw_spaceheat
export GW_SPACEHEAT_TEST_DOTENV_PATH=test/.env-gw-spaceheat-test-pi
pytest