Code Monkey home page Code Monkey logo

nose-selecttests's Introduction

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

nose-selecttests's People

Contributors

domenkozar avatar tatsuakimitani avatar maron8676 avatar pombredanne avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.