<br>Sorry for the delay. I am experiencing some problems with my Internet connection...
<br>
<br>> > > Is there a similar way to execute those doctests via dutest, so I can
<br>> > > check out its new features?
<br>> >
<br>> > I prefer you to read the article (see the links below), because there
<br>> > is comprehensive documentation and examples there...
<br>
<br>> I skimmed through it and on page 47 there's code looking like this:
<br>> 
<br>> import dutest
<br>> 
<br>> if __name__ == "__main__":
<br>> dutest.main()
<br>> 
<br>> That clearly doesn't work giving me an exception:
<br>> 
<br>> AttributeError: 'module' object has no attribute 'main'
<br>
<br>
<br>You are right... ;)
<br>
<br>The fact is that the code included nowadays in the module dutest was
<br>previously developped inside the module oop.utils.testing. When I
<br>prepared the first release I did not move the class VerboseTestProgram
<br>onto dutest module...
<br>
<br>Therefore I performed the following changes in my working copy:
<br>
<br>  * The class oop.utils.testing.VerboseTestProgram has been moved onto
<br>    dutest module.
<br>  
<br>  * Default test loader and runner have been added to this module as
<br>    well. The default loader is an instance of MultiTestLoader that
<br>    combines the suites loaded by unittest.TestLoader and 
<br>    dutest.DocTestLoader.
<br>  
<br>  * dutest.main is an alias for dutest.VerboseTestProgram. This class
<br>    fixes a "little bug" (... IMO) found for unittest.TestProgram when
<br>    specifying different verbosity levels (at least it does not work for
<br>    me when I try to run the tests from the command line). Besides it
<br>    uses the aforementioned test loaders instead of unittest's.
<br>    
<br>I will share this as soon as possible with you... but (as I said before)
<br>I am experiencing some problems with my Internet connection (especially
<br>with accessing the SVN repository of the FLiOOPS project).
<br>
<br>So... please, be patient.
<br>
<br>Ahhh... and thanks a lot.
<br>
<br>> > If you checked out the whole package (the trunk) using SVN... you can
<br>> > take a look at the initialization of the default test
<br>> > loader employed in oop.test.test_oopdbc module...
<br>> >
<br>> > It looks something like this...
<br>
<br>> Isn't there a simpler way, like the one I cited for doctest?
<br>
<br>The idea is the following... write tests like if you were using doctest,
<br>next load and run them like if you were using unittest. So, after writing
<br>the doctests, you can follow the steps usually performed while using
<br>unittest. As far as I know this means...
<br>
<br>  * Create a unittest loader, load a suite, and run the test
<br>    cases (test suite). This is done with dutest as follows:
<br>
<br>{{{
<br>#! python
<br>
<br>loader = dutest.DocTestLoader() # Further arguments for advanced features
<br>                          
<br>suite = loader.loadTestsFromModule(module) # This creates one instance 
<br>                                           # of DocTestCase for each doctest
<br>                                           # Example instance loaded in the
<br>                                           # previous step.
<br>
<br>dutest.VerboseTestRunner(verbosity=2).run(suite) # This actually checks the 
<br>                                                 # doctest examples.
<br>}}}
<br>
<br>  * Otherwise the traditional...
<br>
<br>{{{
<br>#! python
<br>
<br>if __name__ == '__main__':
<br>    dutest.main()
<br>
<br>}}}
<br>
<br>I see no more options according to [1]
<br>
<br>> > > And another thing. You reference the article "Doctest and unittest…
<br>> > > now they'll live happily forever". Is it available somewhere online?
<br>> >
<br>> > Yes... take a look at TPP site [1]... you can download it directly from [2]
<br>
<br>> Thank you. I'll read through it during the weekend.
<br>
<br>Any further comments? Ok... I know perhaps you'ld like to see and try the 
<br>module after applying the changes I mentioned before. However if you have
<br>any coment about the article, feel free to ask too ;)
<br>
<br>
<br>-------
<br>[1] 23.3.1 Basic example
<br>    (http://docs.python.org/lib/minimal-example.html)
<br>
<br>
<br>
<br>Regards,
<br>
<br>Olemis.
<br>
<br>PD: Please... reply to olemis@gmail.com...
<br>