https://github.com/spyder-ide/spyder-unittest
A plugin for Spyder to run tests and view the results
https://github.com/spyder-ide/spyder-unittest
nose pytest python spyder spyder-plugin testing
Last synced: 3 months ago
JSON representation
A plugin for Spyder to run tests and view the results
- Host: GitHub
- URL: https://github.com/spyder-ide/spyder-unittest
- Owner: spyder-ide
- License: mit
- Created: 2015-12-06T16:48:54.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2024-09-03T16:44:06.000Z (about 1 year ago)
- Last Synced: 2025-06-01T19:32:05.719Z (4 months ago)
- Topics: nose, pytest, python, spyder, spyder-plugin, testing
- Language: Python
- Homepage:
- Size: 730 KB
- Stars: 82
- Watchers: 12
- Forks: 34
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE.txt
- Authors: AUTHORS
Awesome Lists containing this project
README
# Spyder-Unittest
## Project information
[](./LICENSE)
[](https://www.anaconda.com/download/)
[](https://www.anaconda.com/download/)
[](https://pypi.org/project/spyder-unittest/)
[](https://gitter.im/spyder-ide/public)
[](#backers)
[](#sponsors)## Build status
[](https://github.com/spyder-ide/spyder-notebook/actions?query=workflow%3A%22Windows+tests%22)
[](https://github.com/spyder-ide/spyder-notebook/actions?query=workflow%3A%22Linux+tests%22)
[](https://github.com/spyder-ide/spyder-notebook/actions?query=workflow%3A%22Macos+tests%22)
[](https://crowdin.com/project/spyder-unittest)*Copyright © 2014 Spyder Project Contributors*

## 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 `nose2` testing frameworks.
Support for `pytest` is most complete at the moment.## Installation
To install this plugin, you can use either ``pip`` or ``conda`` package managers, as follows:
Using conda (the recommended way!):
```
conda install spyder-unittest -c conda-forge
```Using pip:
```
pip install spyder-unittest
```**Note**: At the moment it is not possible to use this plugin with the [Spyder installers](http://docs.spyder-ide.org/current/installation.html#standalone-installers) for Windows and macOS. We're working to make that a reality in the future.
## 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](https://github.com/spyder-ide/spyder-unittest/issues).
Use the [Spyder Google Group](https://groups.google.com/group/spyderlib)
or our [Gitter Chatroom](https://gitter.im/spyder-ide/public)
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](https://github.com/spyder-ide/spyder) (obviously), at least version 4.0
* [lxml](http://lxml.de/)
* the testing framework that you will be using: [pytest](https://pytest.org)
and/or [nose2](https://docs.nose2.io)In order to run the tests distributed with this plugin, you need
[nose2](https://docs.nose2.io), [pytest](https://pytest.org)
and [pytest-qt](https://github.com/pytest-dev/pytest-qt). If you use Python 2,
you also need [mock](https://github.com/testing-cabal/mock).You are very welcome to submit code contributions in the form of pull
requests to the
[issue tracker](https://github.com/spyder-ide/spyder-unittest/issues).
GitHub is configured to run pull requests automatically against the test suite
and against several automatic style checkers using
[ciocheck](https://github.com/ContinuumIO/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](
https://github.com/spyder-ide/spyder/blob/master/CONTRIBUTING.md)
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](https://www.spyder-ide.org/)
[Download Spyder (with Anaconda)](https://www.anaconda.com/download/)
[Spyder Github](https://github.com/spyder-ide/spyder)
[Troubleshooting Guide and FAQ](
https://github.com/spyder-ide/spyder/wiki/Troubleshooting-Guide-and-FAQ)[Development Wiki](https://github.com/spyder-ide/spyder/wiki/Dev:-Index)
[Gitter Chatroom](https://gitter.im/spyder-ide/public)
[Google Group](https://groups.google.com/group/spyderlib)
[@Spyder_IDE on Twitter](https://twitter.com/spyder_ide)
[@SpyderIDE on Facebook](https://www.facebook.com/SpyderIDE/)
[Support Spyder on OpenCollective](https://opencollective.com/spyder/)