Hey, some of our "backing libraries" like ovirtfunctions.py contain doctests. Those are small for documenting the usage of the function but can also be used for testing [1]. As pointed out on the wiki [2] thos tests can't be run at dev. time, because they partially rely on runtime functionality.
Just a minute ago I tested to run the doctest on ovirtfunctions.py on a running node: 1. Installed a node 2. Dropped to console 3. ran:: cd /usr/lib/python2.7/site-packages/ovirtnode python -m doctest ovirtfunctions.py This failed, but is actually expected - as no work has gone into enabling this feature. There are two things we should do: 1. Fix the error that prevented running the doctest (smome indentation problem!?) 2. Add doctests to python functions to cover more functions 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. That was an update on how to run doctests - but don't hesitate to join in to make Node more stable. Greetings fabian -- [1] http://docs.python.org/library/doctest.html [2] http://ovirt.org/wiki/Node_Testing [3] http://gerrit.ovirt.org/gitweb?p=ovirt-node-tests.git;a=blob; f=docs/Writing_TUI_Tests.rst;hb=HEAD
signature.asc
Description: This is a digitally signed message part
_______________________________________________ node-devel mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/node-devel
