[JOSS] Report (and improve) test coverage
See original GitHub issueRunning python -m pytest tests/ --cov=cellpylib
(with pytest-cov
package installed) currently yields the following coverage report:
---------- coverage: platform darwin, python 3.9.6-final-0 -----------
Name Stmts Miss Cover
-------------------------------------------------
cellpylib/__init__.py 9 0 100%
cellpylib/apen.py 17 1 94%
cellpylib/bien.py 45 0 100%
cellpylib/ca_functions.py 133 17 87%
cellpylib/ca_functions2d.py 119 69 42%
cellpylib/ctrbl_rule.py 27 0 100%
cellpylib/entropy.py 35 1 97%
cellpylib/hopfield_net.py 28 0 100%
cellpylib/langtons_loop.py 121 116 4%
cellpylib/rule_tables.py 74 6 92%
-------------------------------------------------
TOTAL 608 210 65%
Wide parts of the library seem to be well-covered and most of the missing statements come from the (rather complicated) langtons_loop
module. However, I would expect a higher test coverage in the two ca_functions
modules, given that they are the core part of the library.
@lantunes Have you checked which of the statements are currently untested and would you consider expanding the corresponding tests to cover wider parts of the core library?
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Improving Test Reports: Adding Test Coverage Information
In this lesson, we'll configure Jest to add coverage information. Updating .gitignore. When we configure Jest to generate a coverage report for our...
Read more >Jest code coverage report explained - Emma Goto
Your app's code coverage is what percentage of the code is currently covered by unit tests. In this post I will explain how...
Read more >4 Steps to Improve Your Test Coverage | SmartBear
Follow these 4 steps to improve your test coverage and provide your users with more robust and enjoyable mobile products. What is Test...
Read more >How to Boost Code Coverage with Functional Testing
In this blog post, we introduce a functional testing approach that does not need any manual setup and can be run like unit...
Read more >The Joss Report - Cleartrade Commodities
Test -drive 'The Joss Report' and your new skills with a demo online trading account. No pressure, no tuition, no commission and no...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have opened a draft PR here: https://github.com/lantunes/cellpylib/pull/23.
For reference, the relevant commits are 6fe535171dc5d587b7b90cd1503f3bb64ce0ff78 and 8a950ba832b22d62c632abc2ce3b5b192c1e3dfb.