protostar
protostar copied to clipboard
Automatically build package when running e2e tests
Current setup requires manually building the package after each change for the e2e tests to reflect these changes. It is quite cumbersome and can be confusing when debugging if one forgets to rebuild.
I am not enteriely sure how to execute it as it would have limit access to pytest cli which is useful while debugging.
generally when i debug i want to use something like pytest path/to/test.py
Maybe we could just document an alias:
alias pytestR="poe build && pytest"
Alias is only helpful to some extend. I'm most often running tests through pycharm directly, so unless it is handled on the pytest level, this won't change anything for me.
We could create pytest fixturesthat would either:
- build protostar package and inject it to tests
- create an autouse fixture that would call build command in subprocess and wait for it to complete
Didn't consider possible issues with this approach. The latter seems easier because it most likely wouldn't require us to change any testing architecture.