hot9cups/probdists

Add tests for PDF plots

saeyma opened this issue · 1 comments

The tests in test.py contains code to verify the numerical correctness of the respective classes. However, there is a PDF plot function that plots a graph using matplotlib (soon seaborn) which is not tested.

Your input as a contributor:

  1. Figure out a way to verify the plot. (Random suggestion: Store a image file and compare generated plot with it) Looking for more robust ideas and open to discussions.
  2. Implement solution discussed in 1 and add tests to respective classes.

When I was initially writing tests, I did want to have tests for plotting functions, but I couldn't think of a solution or find much online. I'm not sure if any other similar library has tests for plotting functions(open sourced code atleast).

If you do have more ideas or are interested in implementing idea #1, I can assign it to you.
(Not sure how you'd compare the two plot images though, seems quite computationally expensive doesn't it?)