[Biopython-dev] Deprecating Bio.ParserSupport, Bio.Blast.NCBIStandalone

Michiel de Hoon mjldehoon at yahoo.com
Thu Jan 31 11:03:12 UTC 2013


Dear all,

[Michiel wrote:]
> Still I would think that there is a better way to do this,
> and I doubt that we are the first ones who want to access
> test files with doctests. I can write a short message to
> comp.lang.python to see have anybody has any suggestions.

So I started writing a message to comp.lang.python, and while reading the doctest documentation to make my message understandable I realized that we can solve our problem by using the setUp and tearDown arguments to doctest.DocTestSuite. Then we put the test files in the same directory as the module we want to test, and use setUp/tearDown to let the unittest switch to this directory when needed.

This has the added benefit that the example files are easier to find for users who want to try out a doctest example.

Perhaps we'll still run into some issues if we try to implement this, but it seems a step in the right direction.

Best,
-Michiel.



More information about the Biopython-dev mailing list