question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[JOSS] Report (and improve) test coverage

See original GitHub issue

Running 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:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
lantunescommented, Sep 28, 2021

I have opened a draft PR here: https://github.com/lantunes/cellpylib/pull/23.

0reactions
lantunescommented, Oct 10, 2021

For reference, the relevant commits are 6fe535171dc5d587b7b90cd1503f3bb64ce0ff78 and 8a950ba832b22d62c632abc2ce3b5b192c1e3dfb.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found