Other nose/plugins

Table Of Contents

Previous topic

Running Tests Using dybinst

Next topic

Standard Operating Procedures

This Page

Daya Bay Links

Content Skeleton

Testing nose plugins

Setup vitualenv sandbox

  1. Install virtualenv (only this step requires write access to nuwa installation):

    ./dybinst trunk external virtualenv
  2. Get virtualenv into your PATH:

    cd $SITEROOT/lcgcmt/LCG_Interfaces/virtualenv/cmt
    cmt config ; . setup.sh
    which virtualenv           ## should be the NuWa one
  3. Create virtual python environment, spawned from nuwa python eg:

    virtualenv ~/v/nose

For background info on virtualenv see http://www.virtualenv.org/en/latest/

Get into the virtualenv

  1. Get into the environment:

    . ~/v/nose/bin/activate
    which pip python easy_install ## should all be from ~/v/nose/bin
  2. install plugin:

    pip install nosepipe
  3. list plugins:

    PYTHONPATH=~/v/nose/lib/python2.7/site-packages:$PYTHONPATH nosetests -p

Interesting Plugins

Many 3rd party plugins:


Plugin for the nose testing framework for running tests in a subprocess

Such a feature would be very useful for DBI testing in order to work with different DBI configurations within a single test run. But it is not clear about the granularity control, would want each module of tests to correspond to a separate process.

From the help:

PYTHONPATH=~/v/nose/lib/python2.7/site-packages:$PYTHONPATH nosetests --help

       Enable plugin ProcessIsolationPlugin: Run each test in
       a separate process. [NOSE_WITH_PROCESS_ISOLATION]

But looks like not running in py27:

(nose)[blyth@belle7 ~]$ PYTHONPATH=~/v/nose/lib/python2.7/site-packages:$PYTHONPATH nosetests --with-process-isolation -v -s test_mp.py
setup 22041
teardown 22041

ERROR: test_mp.test_red
Traceback (most recent call last):
  File "/data1/env/local/dyb/external/nose/0.11.4_python2.7/i686-slc5-gcc41-dbg/lib/python2.7/site-packages/nose/case.py", line 132, in run
  File "/data1/env/local/dyb/external/nose/0.11.4_python2.7/i686-slc5-gcc41-dbg/lib/python2.7/site-packages/nose/case.py", line 150, in runTest
  File "/home/blyth/v/nose/lib/python2.7/site-packages/nosepipe.py", line 152, in __call__
    (request_len, len(data)))
Exception: short message body (want 1416782179, got 207)