Skip to content
A plugin for Spyder to run tests and view the results
Branch: master
Clone or download
jitseniesen Merge pull request #123 from jitseniesen/circle
Transition from CircleCI version 1 to 2
Latest commit 7548b0b Aug 4, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
.github Add issue template for Github Feb 16, 2018
conda.recipe Change version to 0.3.1 Jun 15, 2018
spyder_unittest Back to development version Jun 15, 2018
.ciocheck
.coveragerc
.gitattributes Create .gitattributes Oct 31, 2016
.gitignore
.travis.yml Remove ciocheck from AppVeyor and Travis CI scripts Aug 3, 2018
AUTHORS
CHANGELOG.md
LICENSE.txt
MANIFEST.in
README.md Further minor changes and fixes and force clean rebuild Jun 11, 2018
appveyor.yml
screenshot.png Update screenshot Feb 16, 2018
setup.cfg
setup.py Replace "py.test" by "pytest" throughout May 31, 2018

README.md

Spyder-Unittest

license pypi version conda version download count OpenCollective Backers Join the chat at https://gitter.im/spyder-ide/public
PyPI status Build Status Build status CircleCI Coverage Status

Copyright © 2014–2018 Spyder Project Contributors

Screenshot of spyder-unittest plugin showing test results

Description

Spyder-unittest is a plugin that integrates popular unit test frameworks with Spyder, allowing you to run test suites and view the results in the IDE.

The plugin supports the unittest module in the Python standard library as well as the pytest and nose testing frameworks. Support for pytest is most complete at the moment.

Installation

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.

Usage

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 are using pytest, you can double-click on a test to view it in the editor.

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.

Feedback

Bug reports, feature requests and other ideas are more than welcome on the issue tracker. Use the Spyder Google Group or our Gitter Chatroom for general discussion.

Development

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: pytest and/or nose

In order to run the tests distributed with this plugin, you need nose, pytest and pytest-qt. If you use Python 2, you also need mock.

You are very welcome to submit code contributions 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.

Contributing

Everyone is welcome to contribute! The document Contributing to Spyder also applies to the unittest plugin.

We are grateful to the entire Spyder community for their support, without which this plugin and the whole of Spyder would be a lot less awesome.

More information

Main Website

Download Spyder (with Anaconda)

Spyder Github

Troubleshooting Guide and FAQ

Development Wiki

Gitter Chatroom

Google Group

@Spyder_IDE on Twitter

@SpyderIDE on Facebook

Support Spyder on OpenCollective

You can’t perform that action at this time.