Back to index

python-biopython  1.60
Public Member Functions
test_Tutorial.TutorialTestCase Class Reference

List of all members.

Public Member Functions

def test_doctests
def tearDown

Detailed Description

Python doctests extracted from the Biopython Tutorial.

Definition at line 99 of file test_Tutorial.py.


Member Function Documentation

Definition at line 117 of file test_Tutorial.py.

00117 
00118     def tearDown(self):
00119         global original_path
00120         os.chdir(original_path)
00121 
00122 
#This is to run the doctests if the script is called directly:
Run tutorial doctests.

Definition at line 102 of file test_Tutorial.py.

00102 
00103     def test_doctests(self):
00104         """Run tutorial doctests."""
00105         runner = doctest.DocTestRunner()
00106         failures = []
00107         for test in doctest.DocTestFinder().find(TutorialDocTestHolder):
00108             failed, success = runner.run(test)
00109             if failed:
00110                 name = test.name
00111                 assert name.startswith("TutorialDocTestHolder.doctest_")
00112                 failures.append(name[30:])
00113                 #raise ValueError("Tutorial doctest %s failed" % test.name[30:])
00114         if failures:
00115             raise ValueError("%i Tutorial doctests failed: %s" % \
00116                              (len(failures), ", ".join(failures)))

Here is the call graph for this function:


The documentation for this class was generated from the following file: