Specify whitelist of keywords for tests to be run by nose
Project description
Simple nose plugin that enables developers to run subset of collected tests to spare some waiting time for better things.
Supports Python 2.x and 3.x, see .travis.yml for specific versions being tested.
Usage
Examples of using the plugin on the plugin package itself:
Run all tests:
$ nosetests -v test_configure_complex (noseselecttests.tests.NoseSelectPluginTest) ... ok test_configure_empty_string (noseselecttests.tests.NoseSelectPluginTest) ... ok test_configure_none (noseselecttests.tests.NoseSelectPluginTest) ... ok test_configure_simple (noseselecttests.tests.NoseSelectPluginTest) ... ok test_is_selected_case_insensitive (noseselecttests.tests.NoseSelectPluginTest) ... ok test_is_selected_negative (noseselecttests.tests.NoseSelectPluginTest) ... ok test_is_selected_simple (noseselecttests.tests.NoseSelectPluginTest) ... ok test_is_selected_unselected (noseselecttests.tests.NoseSelectPluginTest) ... ok test_is_selected_unselected_override (noseselecttests.tests.NoseSelectPluginTest) ... ok test_is_selected_wildcard (noseselecttests.tests.NoseSelectPluginTest) ... ok test_options (noseselecttests.tests.NoseSelectPluginTest) ... ok test_prepareTestCase_exclude (noseselecttests.tests.NoseSelectPluginTest) ... ok test_prepareTestCase_select (noseselecttests.tests.NoseSelectPluginTest) ... ok ---------------------------------------------------------------------- Ran 13 tests in 0.008s OK
Only run tests with keyword configure:
$ nosetests -v -t configure test_configure_complex (noseselecttests.tests.NoseSelectPluginTest) ... ok test_configure_empty_string (noseselecttests.tests.NoseSelectPluginTest) ... ok test_configure_none (noseselecttests.tests.NoseSelectPluginTest) ... ok test_configure_simple (noseselecttests.tests.NoseSelectPluginTest) ... ok ---------------------------------------------------------------------- Ran 4 tests in 0.006s OK
Case insensitive:
$ nosetests -v -t CONFIGURE test_configure_complex (noseselecttests.tests.NoseSelectPluginTest) ... ok test_configure_empty_string (noseselecttests.tests.NoseSelectPluginTest) ... ok test_configure_none (noseselecttests.tests.NoseSelectPluginTest) ... ok test_configure_simple (noseselecttests.tests.NoseSelectPluginTest) ... ok ---------------------------------------------------------------------- Ran 4 tests in 0.006s OK
Only run tests with keyword configure but exclude tests with keyword complex:
$ nosetests -v -t configure -e complex test_configure_empty_string (noseselecttests.tests.NoseSelectPluginTest) ... ok test_configure_none (noseselecttests.tests.NoseSelectPluginTest) ... ok test_configure_simple (noseselecttests.tests.NoseSelectPluginTest) ... ok ---------------------------------------------------------------------- Ran 3 tests in 0.006s OK
Multiple keywords resolve to OR operation:
$ nosetests -v -t none -t simple test_configure_none (noseselecttests.tests.NoseSelectPluginTest) ... ok test_configure_simple (noseselecttests.tests.NoseSelectPluginTest) ... ok test_is_selected_simple (noseselecttests.tests.NoseSelectPluginTest) ... ok ---------------------------------------------------------------------- Ran 3 tests in 0.018s OK
To just exclude some tests, use -e which is provided by nose itself:
$ nosetests -v -e is_selected test_configure_complex (noseselecttests.tests.NoseSelectPluginTest) ... ok test_configure_empty_string (noseselecttests.tests.NoseSelectPluginTest) ... ok test_configure_none (noseselecttests.tests.NoseSelectPluginTest) ... ok test_configure_simple (noseselecttests.tests.NoseSelectPluginTest) ... ok test_options (noseselecttests.tests.NoseSelectPluginTest) ... ok test_prepareTestCase_exclude (noseselecttests.tests.NoseSelectPluginTest) ... ok test_prepareTestCase_select (noseselecttests.tests.NoseSelectPluginTest) ... ok ---------------------------------------------------------------------- Ran 7 tests in 0.005s OK
History
0.5 (2016-02-22)
Python 3 support [Domen Kožar]
0.4 (2013-08-27)
Fixed bug to avoid running class fixtures if a test is not selected. [Philippe Ombredanne]
Added PluginTester tests [Philippe Ombredanne]
0.3 (2012/12/29)
Removed code for excluding tests (-e already does that) [Domen Kožar]
Don’t select all tests that have None as test name (could be a module level SkipTest) [Domen Kožar]
0.2 (2012/07/27)
Report SyntaxErrors instead of crashing [Domen Kožar]
0.1 (2012/07/08)
initial release [Domen Kožar]
nose-selecttests Copyright (c) 2012, Domen Kožar All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ‘’AS IS’’ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
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
Built Distribution
File details
Details for the file nose-selecttests-0.5.tar.gz
.
File metadata
- Download URL: nose-selecttests-0.5.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0394097d569831750a8b9a8caf7a41140261a44d37af782c3299a93f71e36880 |
|
MD5 | 6882c36f728039b647d96baef06f1606 |
|
BLAKE2b-256 | 3d74d4c0213ec6376c6182f222c1b41405d5ad353f1d5cfa6e0ff000e9217ff7 |
File details
Details for the file nose_selecttests-0.5-py2-none-any.whl
.
File metadata
- Download URL: nose_selecttests-0.5-py2-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b652247c144d09441589bed9ba47081b054ae92f4a10692074b343a578289e00 |
|
MD5 | 79d9e931bd70e5bceb1ad1263c30c91e |
|
BLAKE2b-256 | 60374bd8de1a05ddd9afc202e0678d104d11687ca695645ebcd0a997e3ce8751 |