Replies: 1 comment
-
|
When we started creating this plugin we also had a python developer mindset and we opted for it being a "proper" plugin. However, twister's maintainer had a very strong opinion against it. After some time I started to better understand his view point. The argument is that this "plugin" shouldn't be treated as a real plugin, but as a core functionality of twister, therefore be tightly coupled with it and being part of the repo. The same way as twister is a part of zephyr. You cannot have one without the other nor mix zephyr and twister versions, so no mixing of twister and pytest-plugin versions. You checkout a given zephyr version and all test tooling is aligned without extra effort. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm playing with pytest test in twister (https://docs.zephyrproject.org/latest/develop/test/pytest.html).
As a python developer, I was a bit bothered that Pytest is wrapped in a bigger process in a way that I don't have the direct output of the test. That understandable for CI, but it's clearly less practical for writing test and/or doing Test Driven Development.
It seems that we can find the command line used (https://youtu.be/6PJ9BnukwoA?si=6wYiy81QolIV6wLs&t=496) and this does work, and that's nice, but I found the way to do it a bit too much complicated.
Is there any easier way to do this ? Having some quick way to run a "one target" build + test with direct pytest process will be really great.
The benefit is that it's became easy and quick to debug pytest based test by putting
breakpoint()in test, which mean a smaller feedback loop. Pytest also provide thepytest -pdboption (https://docs.pytest.org/en/stable/how-to/failures.html). Also, it can also permit to receive instant error using pytest plugin like pytest-sugar (https://pypi.org/project/pytest-sugar/)Also thanks for this really nice software, the pytest integration is great.
Beta Was this translation helpful? Give feedback.
All reactions