Metadata-Version: 2.1
Name: nose2-kflag
Version: 1.0
Summary: nose2 plugin to only run tests which match a given substring
Home-page: https://github.com/stefanholek/nose2-kflag
Author: Stefan H. Holek
Author-email: stefan@epy.co.at
License: BSD-2-Clause
Project-URL: Bug Tracker, https://github.com/stefanholek/nose2-kflag/issues
Project-URL: Source Code, https://github.com/stefanholek/nose2-kflag
Keywords: nose2 plugin kflag test-name-pattern patterns filter
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 3
Requires-Dist: nose2

===========
nose2-kflag
===========
------------------------------------------------------------------
Only run tests which match a given substring
------------------------------------------------------------------

Overview
========

This package provides a nose2 plugin implementing the -k flag known from
unittest discover. The plugin allows to select tests by specifying on or more
substring patterns.

Patterns
========

Matching is performed against the full dotted name of each test. If a pattern
is prefixed with '!' its meaning is inverted, and only tests not matching
the pattern will be selected. Multiple -K flags (plugin rules mandate
uppercase) may be given. A test is selected if *any* of the given
positive patterns and *all* of the given negative patterns apply.
Patterns are case sensitive.

Examples
========

Run one test::

    nose2 -K test_foo

Run one test of a specific test class::

    nose2 -K FooTestCase.test_bar

Run all tests of a test class::

    nose2 -K FooTestCase

Run all foo and bar tests except those in the functional directory::

    nose2 -K foo -K bar -K '!functional'

Installation
============
::

    pip install nose2-kflag

Then add the plugin to your nose2.cfg::

    [unittest]
    plugins = nose2_kflag


Changelog
=========

1.0 - 2020-06-14
----------------

- Initial release.


