[node-devel] Running doctests on Node and improving them

Fabian Deutsch fabiand at redhat.com
Thu Jul 5 16:38:21 UTC 2012


Am Donnerstag, den 05.07.2012, 11:58 -0400 schrieb Mike Burns:
> > There are two things we should do:
> > 1. Fix the error that prevented running the doctest (smome
> indentation 
> >    problem!?)
> 
> Please file a bz (and provide a patch ;-) )

It wasn't much:
http://gerrit.ovirt.org/5985

But one interesting thing: 
1. doctests on .pyc files fail
2. python -m doctest to_the_same_prefix_of_file_but_with_py_suffix.py
   works _ even if the file doesn't exist! (Asking this upstream)

> > 2. Add doctests to python functions to cover more functions
> 
> Please file bz's with "RFE: " in the summary for this.  This is a
> longer
> term goal

Yes, good point to track this.

> > 
> > doctests are a fine granular piece in our CI testing effort - but
> are
> > easy to create.
> > One question is if we should also add real unit tests covering wider
> > parts?
> > I'd rather go with higher-level testcases (e.g. TUI tests [3]),
> which
> > should cover the core functionality.
> 
> Agreed that we should lean more toward the testcases to cover our
> testing, but having unit tests is absolutely useful as well.  I'd
> stick
> to simple unit tests with doctest and have a higher level test case
> that
> will run the doctest stuff as well. 

Right. Unit tests are also important to achieve the goal of a stable
Node.

Greetings
fabian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ovirt.org/pipermail/node-devel/attachments/20120705/b2d698ba/attachment.sig>


More information about the node-devel mailing list