source icon indicating copy to clipboard operation
source copied to clipboard

Expand unit tests.

Open CnlPepper opened this issue 8 years ago • 4 comments

Our unit tests are currently quite minimal outside the core, and we also don't have full coverage in the core. This needs to be addressed before V1 is released.

CnlPepper avatar Mar 09 '17 20:03 CnlPepper

In Cherab we have the ability to report test coverage using coverage.py, courtesy of https://github.com/cherab/core/pull/155. It would be an almost straight copy of this PR (with s/cherab/raysect/) to provide the same capability in Raysect. This could be used to track expansion of unit tests, and ensure any new features are fully supported by tests. Is this something you'd be interested in adding?

jacklovell avatar Oct 23 '19 10:10 jacklovell

This sounds sensible to me. I can't see any reason why this couldn't be added. @CnlPepper?

mattngc avatar Oct 24 '19 20:10 mattngc

Thanks @jacklovell I've added the relevant code and configuration to the raysect repository. See 0ff46d66b19138890d92bf3b0da5185bdb550a7b.

Our current coverage (for the dev branch) is 29%, which is unsurprising as only the core has tests at present. We'll need to figure out a strategy for testing the statistical elements of the codebase. We could try fixing the random number seed and storing the result but I'm not convinced that will be any more reliable than testing to 5 or 6 sigma.

CnlPepper avatar Oct 24 '19 20:10 CnlPepper

Great, I think this issue is too generic though. I think we should close it and replace with more targetted ones.

mattngc avatar Oct 24 '19 20:10 mattngc