Massimo
http://pygments.org/demo/3361/?style=fruity
My script will print:
Finding tests in sample
0
Finding tests in with_doctests
3
Maybie this could be used..
On 14 Mrz., 21:14, mdipierro <mdipie...@cs.depaul.edu> wrote:
> fantastic. I am uploading the solution to trunk. Thank you.
>
> On Mar 14, 11:44 am, Joschua <cit_corperat...@gmx.net> wrote:
>
> > I looked into the python documentation and find DocTestFinder:
>
> >http://pygments.org/demo/3361/?style=fruity
>
> > My script will print:
>
> > Finding tests in sample
> > 0
> > Finding tests in with_doctests
> > 3
>
> > Maybie this could be used..
>
> > On 13 Mrz., 17:18, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > > I looked into this. It is a python issue. ThedoctestAPI return '' if
> > > no test or passed test and return !='' if test fails. web2py cannot
> > > easily discriminate if a test is there and passes or there isn't any.
> > > If you can find something more about this let me know.
>
> > > Massimo
>
> > > On Mar 13, 5:23 am, Joschua <cit_corperat...@gmx.net> wrote:
>
> > > > yeah, that would be great, because it twist the facts.. ^^
>
> > > > On 11 Mrz., 23:15, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > > > > I think that'sdoctestdoing. If there is no actual test but there is
> > > > > a docstring, it is assumed "pass".
> > > > > It may be web2py's too. I need to check.
>
> > > > > On Mar 11, 4:05 pm, Joschua <cit_corperat...@gmx.net> wrote:
>
> > > > > > As example, when you look in the examples app in simple_examples.py
> > > > > > and you execute thedoctest, the docstrings in the controller hello4,
> > > > > > hello5 and hello6 are recognized as doctests and passed. I think this
> > > > > > is a bug (or is thedoctest/ web2py not able to check that, >>>?)
the are two ways to solve this (the second slash after examples)
problem:
#1: change line 62 at /gluon/compileapp.py to "name = '%scontrollers/
%s.py in %s.__doc__' \", which is fairly ugly.
#2: remove the last slash at line 353 in gluon/main.py AND check all
files that use request.folder, that they work correctly. although I
think it would be better to not let a directory end with a slash in
source code, but to change this will maybie break other things.
On 14 Mrz., 21:14, mdipierro <mdipie...@cs.depaul.edu> wrote: