nvim-neotest / neotest-python

MIT License
137 stars 40 forks source link

[Feature Request] Support streaming results with unittest #39

Open valentingregoire opened 2 years ago

valentingregoire commented 2 years ago

When running all unit tests in a class, you can see a loading indicator in the summary view. It would be nice that each method gets updated when they are finished. Currently, only after the very last test, all the loading indicators will stop simultaneously and the ouput_panel will be populated with the output of all tests at once. If the output and the loading indicators get updated per test, you have an indicator of progress through the class.

jfpedroza commented 2 years ago

That behavior depends on whether the adapter supports streaming results. Adapters that do support it, behave like that.

What adapter are you using?

valentingregoire commented 2 years ago

I am using neotest-python with unittest as a runner (and dap = { justMyCode = false}).

rcarriga commented 2 years ago

Ah yep neotest-python only supports streaming results with pytest. If you can, I'd say to move over to pytest because the support is better in multiple ways but also happy to take PRs to add support for unittest streaming.

valentingregoire commented 2 years ago

Ah yep neotest-python only supports streaming results with pytest. If you can, I'd say to move over to pytest because the support is better in multiple ways but also happy to take PRs to add support for unittest streaming.

Ok, I understand that unittest does not support streaming results. Pytest for my case doesn't work, or I fail to configure it properly.

rcarriga commented 2 years ago

I'll keep this open, I'll try get to it at some stage :smile:

afrischk commented 11 months ago

If you can give me some pointers I could take over as result streaming would be similar to django unit test result streaming. It uses the unit test TestRunner under the hood.

valentingregoire commented 11 months ago

I haven't looked at this for a year, so I can't help you anymore. I had a piece written already, maybe it's in my fork, unless I removed my fork already.

Op za 9 dec. 2023 09:24 schreef Adrian Frischkorn @.***

:

If you can give me some pointers I could take over as result streaming would be similar to django unit tests. It uses the unit test TestRunner under the hood.

— Reply to this email directly, view it on GitHub https://github.com/nvim-neotest/neotest-python/issues/39#issuecomment-1848324329, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHYZ7UB4WJPRFZEP5KO3T3TYIQN2NAVCNFSM6AAAAAASHS5TBKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBYGMZDIMZSHE . You are receiving this because you modified the open/close state.Message ID: @.***>