sos-notebook icon indicating copy to clipboard operation
sos-notebook copied to clipboard

Improve test coverage of source code

Open BoPeng opened this issue 7 years ago • 4 comments

https://coveralls.io/github/vatlab/sos-notebook

The coverage rate of sos notebook source code is not great. Mostly because the source code are triggered behind the sos kernel. Perhaps there is some way we can adjust the coverall python package to report the hidden coverage.

BoPeng avatar Jun 28 '18 13:06 BoPeng

Interested in helping with it! But where should I start?

HenryLeongStat avatar Jun 28 '18 15:06 HenryLeongStat

  1. Have a look at the travis test file and understand how the test works.
  2. Install coverage codacy-coverage pytest pytest-cov python-coveralls (not sure if they are all needed)
  3. Run the test and see if you can generate coverage file locally.
  4. Go to https://coveralls.io/github/vatlab/sos-notebook, find the lowest covered files and check if they are covered by our test suite.
  5. If the code should have been covered, check why it is not included in coverage report.
  6. If the code is not covered, write test to test it.

BoPeng avatar Jun 28 '18 16:06 BoPeng

Will do! Is the approach same as this ticket?

HenryLeongStat avatar Jun 28 '18 16:06 HenryLeongStat

Yes

BoPeng avatar Jun 28 '18 16:06 BoPeng