diff options
Diffstat (limited to 'doc/development')
-rw-r--r-- | doc/development/index.txt | 1 | ||||
-rw-r--r-- | doc/development/plugins.txt | 4 | ||||
-rw-r--r-- | doc/development/setup.txt | 7 | ||||
-rw-r--r-- | doc/development/unit-testing.txt | 25 |
4 files changed, 27 insertions, 10 deletions
diff --git a/doc/development/index.txt b/doc/development/index.txt index 352000dc8..2a54bfad8 100644 --- a/doc/development/index.txt +++ b/doc/development/index.txt @@ -39,3 +39,4 @@ git access. Mail the :ref:`help-mailinglist` for details. testing documentation docstyleguide + unit-testing diff --git a/doc/development/plugins.txt b/doc/development/plugins.txt index 15b512365..b2b70f553 100644 --- a/doc/development/plugins.txt +++ b/doc/development/plugins.txt @@ -164,7 +164,6 @@ Example Connector Bcfg2.Server.Plugin.Connector): '''The Foo plugin is here to illustrate a barebones connector''' name = 'Foo' - version = '$Revision: $' experimental = True def __init__(self, core, datastore): @@ -195,13 +194,10 @@ do so. We will call our new plugin `MyMetadata`. .. code-block:: python - __revision__ = '$Revision$' - import Bcfg2.Server.Plugins.Metadata class MyMetadata(Bcfg2.Server.Plugins.Metadata.Metadata): '''This class contains data for bcfg2 server metadata''' - __version__ = '$Id$' __author__ = 'bcfg-dev@mcs.anl.gov' def __init__(self, core, datastore, watch_clients=True): diff --git a/doc/development/setup.txt b/doc/development/setup.txt index e9fc6e1e5..b04bce3fe 100644 --- a/doc/development/setup.txt +++ b/doc/development/setup.txt @@ -12,13 +12,8 @@ Checking Out a Copy of the Code git clone git://git.mcs.anl.gov/bcfg2.git -* Create link to :file:`src/lib`:: - - cd bcfg2 - ln -s src/lib Bcfg2 - * Add :file:`bcfg2/src/sbin` to your :envvar:`PATH` environment variable -* Add :file:`bcfg2` to your :envvar:`PYTHONPATH` environment variable +* Add :file:`bcfg2/src/lib` to your :envvar:`PYTHONPATH` environment variable Using a Virtual Environment for Development diff --git a/doc/development/unit-testing.txt b/doc/development/unit-testing.txt new file mode 100644 index 000000000..30217dcc5 --- /dev/null +++ b/doc/development/unit-testing.txt @@ -0,0 +1,25 @@ +.. -*- mode: rst -*- + +.. _development-unit-testing: + +================== +Bcfg2 unit testing +================== + +.. _Python Mock Module: http://python-mock.sourceforge.net/ +.. _Python Nose: http://readthedocs.org/docs/nose/en/latest/ + +You will first need to install the `Python Mock Module`_ and `Python +Nose`_ modules. You can then run the existing tests with the +following.:: + + cd testsuite + nosetests + +You should see output something like the following:: + + .................................................. + ---------------------------------------------------------------------- + Ran 50 tests in 0.121s + + OK |