neotest-python icon indicating copy to clipboard operation
neotest-python copied to clipboard

[Feature Request] Support streaming results with unittest

Open valentingregoire opened this issue 2 years ago • 7 comments

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.

valentingregoire avatar Nov 20 '22 20:11 valentingregoire

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

What adapter are you using?

jfpedroza avatar Nov 20 '22 22:11 jfpedroza

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

valentingregoire avatar Nov 21 '22 07:11 valentingregoire

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.

rcarriga avatar Nov 22 '22 09:11 rcarriga

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.

valentingregoire avatar Nov 23 '22 08:11 valentingregoire

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

rcarriga avatar Nov 23 '22 10:11 rcarriga

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.

afrischk avatar Dec 09 '23 08:12 afrischk

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: @.***>

valentingregoire avatar Dec 12 '23 20:12 valentingregoire