spyder-ide / spyder-unittest

A plugin for Spyder to run tests and view the results
MIT License
79 stars 34 forks source link

PR: Add UnittestWorker for tests using unittest #202

Closed jitseniesen closed 1 year ago

jitseniesen commented 1 year ago

Instead of parsing the output of unittest, which is supposed to be human reading and thus error prone to parse, run the tests programmatically and send the test results over a separate channel. This mirrors what we do with pytest.

Add a test with an example that was parsed incorrectly before and now works.

Fixes #73. Fixes #76. Fixes #160.

codecov-commenter commented 1 year ago

Codecov Report

Merging #202 (c97b676) into master (a9e3cb5) will increase coverage by 0.97%. The diff coverage is 96.22%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files | [Impacted Files](https://codecov.io/gh/spyder-ide/spyder-unittest/pull/202?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spyder-ide) | Coverage Δ | | |---|---|---| | [spyder\_unittest/backend/workers/\_\_init\_\_.py](https://codecov.io/gh/spyder-ide/spyder-unittest/pull/202?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spyder-ide#diff-c3B5ZGVyX3VuaXR0ZXN0L2JhY2tlbmQvd29ya2Vycy9fX2luaXRfXy5weQ==) | `100.00% <ø> (ø)` | | | [spyder\_unittest/backend/workers/zmqwriter.py](https://codecov.io/gh/spyder-ide/spyder-unittest/pull/202?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spyder-ide#diff-c3B5ZGVyX3VuaXR0ZXN0L2JhY2tlbmQvd29ya2Vycy96bXF3cml0ZXIucHk=) | `84.21% <70.00%> (-15.79%)` | :arrow_down: | | [spyder\_unittest/backend/workers/unittestworker.py](https://codecov.io/gh/spyder-ide/spyder-unittest/pull/202?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spyder-ide#diff-c3B5ZGVyX3VuaXR0ZXN0L2JhY2tlbmQvd29ya2Vycy91bml0dGVzdHdvcmtlci5weQ==) | `97.95% <97.95%> (ø)` | | | [spyder\_unittest/backend/unittestrunner.py](https://codecov.io/gh/spyder-ide/spyder-unittest/pull/202?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spyder-ide#diff-c3B5ZGVyX3VuaXR0ZXN0L2JhY2tlbmQvdW5pdHRlc3RydW5uZXIucHk=) | `100.00% <100.00%> (+9.47%)` | :arrow_up: | | [spyder\_unittest/backend/workers/pytestworker.py](https://codecov.io/gh/spyder-ide/spyder-unittest/pull/202?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spyder-ide#diff-c3B5ZGVyX3VuaXR0ZXN0L2JhY2tlbmQvd29ya2Vycy9weXRlc3R3b3JrZXIucHk=) | `98.55% <100.00%> (+6.14%)` | :arrow_up: | ... and [1 file with indirect coverage changes](https://codecov.io/gh/spyder-ide/spyder-unittest/pull/202/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spyder-ide)