Skip to main content

Plugin to run tests from within the Spyder IDE

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spyder_unittest-0.7.1.tar.gz (61.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spyder_unittest-0.7.1-py3-none-any.whl (77.6 kB view details)

Uploaded Python 3

File details

Details for the file spyder_unittest-0.7.1.tar.gz.

File metadata

  • Download URL: spyder_unittest-0.7.1.tar.gz
  • Upload date:
  • Size: 61.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for spyder_unittest-0.7.1.tar.gz
Algorithm Hash digest
SHA256 a50f559028803001ae63b76e90151e9a567806c8ffef1ca24dec3179a450bd7d
MD5 69f56e9c882a708f877cf3df1fd97ea1
BLAKE2b-256 bf55aaa6c7aa1aebb2378d508ffed23c3af3e373f59e3423fc813eeac15e55b3

See more details on using hashes here.

File details

Details for the file spyder_unittest-0.7.1-py3-none-any.whl.

File metadata

File hashes

Hashes for spyder_unittest-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4768264207bcc424c1597413f98fe82dd29b7c6d4c799af9ff30c1d0980736d1
MD5 49c79e0320a43c47cc476656f6e53aed
BLAKE2b-256 f3e407bf15da458714db6453f380a90ca23aa883635251a3c64d96f3dc97697a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page