This is a plugin for Spyder that integrates popular unit test frameworks. It allows you to run tests and view the results.
This is a work in progress. It is quite useable, but there is obvious room
for improvement. The plugin supports the unittest framework in the Python
standard library and the py.test and nose testing frameworks.
The unittest plugin is available in the spyder-ide channel in Anaconda and in PyPI,
so it can be installed with the following commands:
- Using Anaconda:
conda install -c spyder-ide spyder-unittest - Using pip:
pip install spyder-unittest
All dependencies will be automatically installed. You have to restart Spyder before you can use the plugin.
The plugin adds an item Run unit tests to the Run menu in Spyder.
Click on this to run the unit tests. After you specify the testing framework
and the directory under which the tests are stored, the tests are run.
The Unit testing window pane (displayed at the top of this file) will pop up
with the results.
If you want to run tests in a different directory or switch testing
frameworks, click Configure in the Options menu (cogwheel icon),
which is located in the upper right corner of the Unit testing pane.
Bug reports, feature requests and other ideas are more than welcome on the issue tracker. You may use http://groups.google.com/group/spyderlib for general discussion.
Development of the plugin is done at https://github.com/spyder-ide/spyder-unittest .
You can install the development version of the plugin by cloning the git repository
and running pip install ., possibly with the --editable flag.
The plugin has the following dependencies:
- spyder (obviously), at least version 3.0
- lxml
- the testing framework that you will be using: py.test and/or nose
In order to run the tests distributed with this plugin, you need nose, py.test and pytest-qt. If you use Python 2, you also need mock.
You are very welcome to submit code contributations in the form of pull requests to the issue tracker. GitHub is configured to run pull requests automatically against the test suite and against several automatic style checkers using ciocheck. The style checkers can be rather finicky so you may want to install ciocheck locally and run them before submitting the code.

