Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: Add UnittestWorker for tests using unittest #202

Merged
merged 4 commits into from
Apr 25, 2023

Conversation

jitseniesen
Copy link
Member

@jitseniesen jitseniesen commented Apr 19, 2023

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.

The downside is that the testing becomes more complicated, because
it needs to adjust sys.path before the local imports.
Also use the opportunity to add type annotations.
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.
@jitseniesen jitseniesen added this to the v0.6.0 milestone Apr 19, 2023
@jitseniesen jitseniesen self-assigned this Apr 19, 2023
@codecov-commenter
Copy link

Codecov Report

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

📣 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 Coverage Δ
spyder_unittest/backend/workers/__init__.py 100.00% <ø> (ø)
spyder_unittest/backend/workers/zmqwriter.py 84.21% <70.00%> (-15.79%) ⬇️
spyder_unittest/backend/workers/unittestworker.py 97.95% <97.95%> (ø)
spyder_unittest/backend/unittestrunner.py 100.00% <100.00%> (+9.47%) ⬆️
spyder_unittest/backend/workers/pytestworker.py 98.55% <100.00%> (+6.14%) ⬆️

... and 1 file with indirect coverage changes

@jitseniesen jitseniesen merged commit 072a814 into spyder-ide:master Apr 25, 2023
@jitseniesen jitseniesen deleted the unittest-worker branch April 25, 2023 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants