HelloThisIsFlo / Appdaemon-Test-Framework

Clean, human-readable tests for Appdaemon
https://hellothisisflo.github.io/Appdaemon-Test-Framework/
MIT License
45 stars 19 forks source link

Implment new scheduler on top of appdaemon #42

Closed lifeisafractal closed 4 years ago

lifeisafractal commented 4 years ago

This PR implements a new scheduler simulation for tests. This is in support of the longer term goal of expanded time travel functionality available for tests. This PR aims to not implement any new functionality, but rather setup some underlying architecture to support these goals. This is another smaller step in the direction that the declined #20 was headed.

Overview of longer term design

Overview of changes in this PR

Follow on work

To get a flavor of where this is going, if this PR gets merged, the next step would be to have the other scheduler functions in ADAPI like run_hourly also be implemented as SpyMocks so their behavior is correct and testable. This has some other implications about the simulation (i.e. some operations only allowed before an automation is initialized), which makes new functionality best left for a follow on PR.

HelloThisIsFlo commented 4 years ago

Rather than try to support that, it's proposed in this PR that we only support appdaemon >=4.x.

As agreed on #32 this is all good, you can break support for <4.x 👍

HelloThisIsFlo commented 4 years ago

I pushed 2 commits to resolve the merge conflicts, just FYI :)

HelloThisIsFlo commented 4 years ago

I added a small commit -> https://github.com/FlorianKempenich/Appdaemon-Test-Framework/pull/42/commits/31d5a7624c71b0dc1de8c86f04eba421c6a955d0

Let me know what you think. If you think it's overkill we can remove it, no worries 😌