Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Minor tweaks to make setup easier

  • Loading branch information...
commit f7495cca6c9eb2375d04994702acbb210aece020 1 parent 6c55479
@clouserw clouserw authored
Showing with 40 additions and 5 deletions.
  1. +13 −5 README.rst
  2. +22 −0 fabfile.py
  3. +5 −0 requirements.txt
View
18 README.rst
@@ -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]
@@ -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
@@ -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:
@@ -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
View
22 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)
View
5 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
Please sign in to comment.
Something went wrong with that request. Please try again.