2 Run all of the doctests in the doc/*.rest files.
5 from testlib
import testutil
6 import unittest
, doctest
9 "Test the code here before adding to doctest @CTB"
11 from pygr
.seqdb
import SequenceFileDB
12 db
= SequenceFileDB(os
.path
.join('data', 'partial-yeast.fasta'))
14 start
, stop
= (87787, 86719)
18 suite
= unittest
.TestSuite()
23 # 'contrib%sfetch.rst' % os.path.sep, @CTB does not work on my system?
24 # 'recipes%spygrdata_recipes.rst' % os.path.sep,
25 # 'recipes%salignment_recipes.rst' % os.path.sep,
28 # needs relative paths for some reason
29 doctestpath
= os
.path
.join('..', 'doc', 'rest')
30 paths
= [ os
.path
.join(doctestpath
, name
) for name
in names
]
33 docsuite
= doctest
.DocFileSuite(path
)
34 suite
.addTest(docsuite
)
38 if __name__
== '__main__':
41 runner
= unittest
.TextTestRunner(verbosity
=2)