Skip to content

Commit

Permalink
Minor tweaks to make setup easier
Browse files Browse the repository at this point in the history
  • Loading branch information
clouserw committed Jul 13, 2010
1 parent 6c55479 commit f7495cc
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 5 deletions.
18 changes: 13 additions & 5 deletions README.rst
Expand Up @@ -22,10 +22,14 @@ Python Libraries for Testing:
- nose
- coverage

You can install everything you need for running and testing with ::

pip install -r requirements.txt

Running
=======

Run the validator as follows:
Run the validator as follows ::

python package-parser.py <path to xpi> [-t <expected type>] [-o <output type>] [-v] [--file <output file>] [--boring]

Expand Down Expand Up @@ -97,7 +101,7 @@ When outputting to a file, Boring Mode is automatically activated.
Boring Mode:
------------

Boring mode, when activated, doesn't print colors to the terminal.
Boring mode, when activated, doesn't print colors to the terminal.


Output
Expand Down Expand Up @@ -230,9 +234,13 @@ For instance, this tree would generate the following messages:
Testing
=======

Unit tests can be run with a simple call to:
Unit tests can be run with ::

fab test

or, after setting the proper python path: ::

nosetests
nosetests

However, to turn run unit tests with code coverage, the appropriate
command would be:
Expand All @@ -241,4 +249,4 @@ command would be:

Note that in order to use the --cover-skip nose parameter, you must install the included patch for nose's coverage.py plugin:

extras/cover.py
extras/cover.py
22 changes: 22 additions & 0 deletions fabfile.py
@@ -0,0 +1,22 @@
"""
Basic fabfile to setup environment for running tests
"""
import functools
import os

from fabric.api import local

ROOT = os.path.abspath(os.path.dirname(__file__))

os.environ['PYTHONPATH'] = os.pathsep.join([ROOT,
os.path.join(ROOT, 'validator')])

local = functools.partial(local, capture=False)

def test(pdb=False):
cmd = 'nosetests'

if pdb:
cmd += ' --pdb --pdb-failures -s'

local(cmd)
5 changes: 5 additions & 0 deletions requirements.txt
@@ -0,0 +1,5 @@
coverage==3.3.1
cssutils==0.9.7b3
Fabric==0.9.0
nose==0.11.4
rdflib==3.0.0

0 comments on commit f7495cc

Please sign in to comment.