Skip to main content

Spyder-Unittest

Project information

license conda version download count pypi version Join the chat at https://gitter.im/spyder-ide/public OpenCollective Backers OpenCollective Sponsors

Build status

Windows status Linux status MacOS status Crowdin

Copyright © 2014 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 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 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. 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 4.0
  • lxml
  • the testing framework that you will be using: pytest and/or nose2

In order to run the tests distributed with this plugin, you need nose2, 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

Release files for spyder-unittest 0.7.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for spyder-unittest 0.7.1
File Size Uploaded
spyder_unittest-0.7.1.tar.gz 61.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for spyder-unittest 0.7.1
File Interpreter ABI Platform
spyder_unittest-0.7.1-py3-none-any.whl Python 3 none any Details

Total release size: 139.0 kB

Release files / spyder_unittest-0.7.1.tar.gz

Download URL spyder_unittest-0.7.1.tar.gz
Size 61.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a50f559028803001ae63b76e90151e9a567806c8ffef1ca24dec3179a450bd7d
BLAKE2b-256 checksum
How to use checksums
bf55aaa6c7aa1aebb2378d508ffed23c3af3e373f59e3423fc813eeac15e55b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.8

Release files / spyder_unittest-0.7.1-py3-none-any.whl

Download URL spyder_unittest-0.7.1-py3-none-any.whl
Size 77.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4768264207bcc424c1597413f98fe82dd29b7c6d4c799af9ff30c1d0980736d1
BLAKE2b-256 checksum
How to use checksums
f3e407bf15da458714db6453f380a90ca23aa883635251a3c64d96f3dc97697a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.8

Release history Release notifications | RSS feed

This release

0.7.1 This release

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page