You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Has anyone experimented with building automated unit tests for pyscripts using a traditional Python unit testing framework like unittest or pytest? I find pyscript a much cleaner and easier way to manage automations than editing YAML files but it would be even better if there was an easy way to build simple unit tests for them.
When making changes I often have to walk around the house and manually trigger things to test my changes and then spend the next few days looking at logs and to make sure they are working as expected. Common mistakes I see are syntax errors, mis-spelling of entities/scenes, etc. are only obvious after cycling through day/night, home/away modes, etc.
Love to hear if there are any good examples out there before I embark on creating my own.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Has anyone experimented with building automated unit tests for pyscripts using a traditional Python unit testing framework like
unittest
orpytest
? I find pyscript a much cleaner and easier way to manage automations than editing YAML files but it would be even better if there was an easy way to build simple unit tests for them.When making changes I often have to walk around the house and manually trigger things to test my changes and then spend the next few days looking at logs and to make sure they are working as expected. Common mistakes I see are syntax errors, mis-spelling of entities/scenes, etc. are only obvious after cycling through day/night, home/away modes, etc.
Love to hear if there are any good examples out there before I embark on creating my own.
Thanks for the great project.
Beta Was this translation helpful? Give feedback.
All reactions