[issue4899] doctest should support fixtures

2014-06-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am closing this for both the general reasons already given and the lack of a proposed api that could programmed, Hence there is no example code that would run and hence no specifics to approve. If someone wanted to pursue this, python-ideas would be a better

[issue4899] doctest should support fixtures

2014-06-27 Thread Mark Lawrence
Mark Lawrence added the comment: I suggest this is closed as "won't fix" as David and Raymond are against it and Tim says he no longer understands doctest. -- nosy: +BreamoreBoy ___ Python tracker _

[issue4899] doctest should support fixtures

2010-08-08 Thread Tim Peters
Tim Peters added the comment: I stopped understanding doctest the last time it was rewritten - it got far more generalized than I ever intended already. It's up to the younger generation to decide how much more inscrutable to make it now ;-) -- __

[issue4899] doctest should support fixtures

2010-08-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: Tim, any opinion on whether this should be kept open or not? -- nosy: +terry.reedy stage: -> unit test needed versions: +Python 3.2 -Python 2.7, Python 3.1 ___ Python tracker

[issue4899] doctest should support fixtures

2009-01-13 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: The OP's problem, i.e. the need to reimport modules in every docstring can easily be addressed by injecting the necessary names using extraglobs argument to doctest.testmod(). I like the following trick: def getextraglobs(): import StringIO, tempfi

[issue4899] doctest should support fixtures

2009-01-13 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +belopolsky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue4899] doctest should support fixtures

2009-01-13 Thread David W. Lambert
David W. Lambert added the comment: For unittests I recommend two things instead of need for doctest change. A decoupled strict test to prove that the iterator works, and this class to publish, class Tped_use_cases(...): def test_Marker_iteration(self): ''' Illustrativ

[issue4899] doctest should support fixtures

2009-01-13 Thread David W. Lambert
David W. Lambert added the comment: My goodness, that's the starting base sequence to gene 38c, chromosome 4 of the Columbian caldera cricket! But seriously... 1) The relevant part of the doc string is this, and this is how it should read (your argument being "if doctests provided setUp framew

[issue4899] doctest should support fixtures

2009-01-13 Thread Giovanni
Giovanni added the comment: I was proposing to adopt doctest in the biopython project (modules for bioinformatics in python, http://biopython.org/). Doctest is very useful to document modules that will be used by many other people: for example, there are many different file formats in bioinform

[issue4899] doctest should support fixtures

2009-01-09 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with David. This is not in the spirit of the doc test module. We already have the heavy-weight unittest module as an alternative when more firepower is needed. Also, adding more infra-structure to the this already lengthy module will make it harde

[issue4899] doctest should support fixtures

2009-01-09 Thread David W. Lambert
David W. Lambert added the comment: I disagree. Purpose of __doc__ is to explain functionality all at once. This command idiom is useful: $ python -c 'from a_module import thing; help(thing)' The doctest module is a lightweight nicety that helps verify that which is suitable. The sufficientl

[issue4899] doctest should support fixtures

2009-01-09 Thread Giovanni
New submission from Giovanni : The doctest module should have support for fixtures (e.g. setUp and tearDown methods). It is very silly to be forced to always re-import all the modules needed in every function tested with doctest. For example, when you have to document functions that open files,