RacimoLab / simGL

Simulate genotype likelihoods from tree sequence data
ISC License
5 stars 1 forks source link

Completting and creating test functions to improve coverage #24

Closed MoiColl closed 2 years ago

grahamgower commented 2 years ago

Are you trying to test the error paths here?

The usual pattern for this is to have a test which asserts that an exception has been raised, such that the test fails if no exception is raised. I recommend import pytest and then using with pytest.raises(TypeError): .... See pytest docs for examples: https://docs.pytest.org/en/7.0.x/reference/reference.html?highlight=raises#pytest-raises

codecov[bot] commented 2 years ago

Codecov Report

Merging #24 (bb388e6) into main (432d9f0) will increase coverage by 28.10%. The diff coverage is 70.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##             main      #24       +/-   ##
===========================================
+ Coverage   44.33%   72.44%   +28.10%     
===========================================
  Files           2        2               
  Lines         106      127       +21     
===========================================
+ Hits           47       92       +45     
+ Misses         59       35       -24     
Impacted Files Coverage Δ
simGL/simGL.py 72.22% <70.00%> (+28.41%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 432d9f0...bb388e6. Read the comment docs.