Browse files

Documented setup for nose and nose-cov under windows. Added little ba…

…tch file for windows users to use to run the nose tests.
  • Loading branch information...
1 parent 4dfc70e commit 7db617b43fc2754ffd9e09c30a8b7e55746ba70e @timlinux timlinux committed Mar 15, 2012
Showing with 45 additions and 2 deletions.
  1. +44 −2 docs/source/developer-docs/preparing_for_development.rst
  2. +1 −0 runtests.bat
46 docs/source/developer-docs/preparing_for_development.rst
@@ -361,6 +361,8 @@ following listing in <QGIS Install Dir>/bin/python-shell.bat::
@echo off
SET GDAL_DRIVER_PATH=%OSGEO4W_ROOT%\bin\gdalplugins\1.8
path %PATH%;%OSGEO4W_ROOT%\apps\qgis\bin;%OSGEO4W_ROOT%\apps\grass\grass-6.4.2RC2\lib
+ rem pip and easyinstall will get added to this dir so add it to our path
+ path %PATH%;"c:\Program Files (x86)\Quantum GIS Wroclaw\apps\Python25\Scripts\"
set PYTHONPATH=%PYTHONPATH%;%OSGEO4W_ROOT%\\apps\\qgis\\python;%OSGEO4W_ROOT%\\apps\\Python25\\Lib\\site-packages
start "Quantum GIS" /B "cmd.exe" %*
@@ -378,9 +380,48 @@ by typing this::
.. note:: You will need to launch the shell as administrator whenever you
need to install python packages by pypi.
-Now in the same shell, use easy setup to install pip::
+Now in the same shell, use easy setup to install pip (make sure you have added
+the QGIS scripts dir to your shell launchers path as described in the comments
+of python-shell.bat)::
- "c:\Program Files (x86)\Quantum GIS Wroclaw\apps\Python25\Scripts\easy_install.exe" pip
+ easy_install pip
+If the installation goes successfully, you should see output like this::
+ Searching for pip
+ Reading
+ Reading
+ Reading
+ Best match: pip 1.1
+ Downloading
+ Processing pip-1.1.tar.gz
+ Running pip-1.1\ -q bdist_egg --dist-dir c:\users\timsut~1\appdata\local
+ \temp\easy_install--zkw-t\pip-1.1\egg-dist-tmp-mgb9he
+ warning: no files found matching '*.html' under directory 'docs'
+ warning: no previously-included files matching '*.txt' found under directory 'docs\_build'
+ no previously-included directories found matching 'docs\_build\_sources'
+ Adding pip 1.1 to easy-install.pth file
+ Installing script to C:\PROGRA~2\QUANTU~1\apps\Python25\Scripts
+ Installing pip.exe script to C:\PROGRA~2\QUANTU~1\apps\Python25\Scripts
+ Installing pip.exe.manifest script to C:\PROGRA~2\QUANTU~1\apps\Python25\Scripts
+ Installing script to C:\PROGRA~2\QUANTU~1\apps\Python25\Scripts
+ Installing pip-2.5.exe script to C:\PROGRA~2\QUANTU~1\apps\Python25\Scripts
+ Installing pip-2.5.exe.manifest script to C:\PROGRA~2\QUANTU~1\apps\Python25\Scripts
+ Installed c:\progra~2\quantu~1\apps\python25\lib\site-packages\pip-1.1-py2.5.egg
+ Processing dependencies for pip
+ Finished processing dependencies for pip
+Next you need to install nose and nose-cov::
+ pip install nose nose-cov
+Once they are installed, you can run the nose tests from windows by going to
+the plugin directory (in your python-shell.bat shell session) and running::
+ runtests.bat
Verifying your system path
@@ -417,3 +458,4 @@ so that the QGIS libs can found::
Assuming you get no error messages, you have a functional python command
line environment which you can use to test QGIS functionality with.
1 runtests.bat
@@ -0,0 +1 @@
+nosetests -v --with-id --with-coverage --cover-package=storage,engine,impact_functions,gui

0 comments on commit 7db617b

Please sign in to comment.