[Bioperl-l] t/SeqIO.t -- improvements?

Chris Fields cjfields at uiuc.edu
Thu Sep 7 21:17:19 UTC 2006


...
> Round-trip tests would be extremely valuable and would be /very/ much
> appreciated. The lack of any have left some large bugs (eg. in taxonomy
> parsing) completely unnoticed/unfixed for years.
> 
> Don't just do a simple diff on the output file since differences may not
> indicate errors (Hilmar's point). Instead read the output file in again
> and make sure the resulting object (and any any objects they contain)
> contains all the same information as the object generated when reading
> the original input file.

That should be fairly simple to do, but I believe some round-trip tests are
already performed in embl.t, swiss.t, and genbank.t, so maybe those test
suites are better places for them.  

Anyway, the more tests there are, and the more strenuous the tests, the
better.

> Ideally the output file would also be checked independently of the
> Bioperl parser being tested, but that may be only possible in a limited
> way (otherwise you'd end up writing a whole new parser...). But eg. if a
> file format specifies that there is a maximum line width, at least check
> that the output file has no lines longer than that. (Again, a real
> problem, and you'll almost certainly discover some bugs related to this
> if you write the tests.)

Wonderful idea!  This wouldn't be hard to do either.  Would this be for all
regular non-XML formats (sequences and alignments)?

> So if you have the time, please add tests and attach them to specific
> new bug reports if your tests reveal bugs
> (http://bugzilla.open-bio.org/), or just email your patch(s) direct to me.
> 
> Cheers,
> Sendu.

Chris




More information about the Bioperl-l mailing list