• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Doc Tests in a File

As you might suspect, not all tests are well suited to be embedded in the doc strings of objects. Sometimes tests check an overall functionality of many components, and other times tests are just too lengthy to be included in the code. For these situations, the Zope 3 developers decided to also make regular text files doc tests. In these cases, you would simply store the test code in a simple text file. The test file can then be registered by using this:

01 doctest.DocFileSuite('filename.txt')


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint