mjmlab/pyinseq

Improve testing

Closed this issue · 2 comments

Currently we have some very basic tests that test whether the output of the example run worked. We need a much more robust testing setup.

In general:

  1. Currently the tests only test the output. I think that tests should test the exact functions!! Getting this done right would allow us to set up TravisCI for the repo.
  2. There are many ways to screw up the code and have it pass these simple tests. Below I'll start brainstorming some of these ways to inform future tests.

Also, we should consider moving from unittest to pytest as many new projects seem to be using it and the asserts seem quite easy to write and read.

Brainstorming testing needs (early thoughts)

i.e., Ways that I can screw up the code and still pass the current tests:

Genbank file parsing edge cases:

  • missing first/last gene
  • carry over annotation from one feature to the next so that features without a gene (should be gene='-') instead get assigned the previous gene name
  • shifted by one row

File management

  • Files not deleted appropriately based on --keepall flag
  • Output files in correct directory

Set up on Travis CI with mandel01@cab13d7. Will return to testing as needed in the future.