Skip to main content

Enables you to modify docstring of tests based on their attributes

Project description

This plugin enables you to modify docstring of tests based on their attributes, the project is available on GitHub.

Installing

You can install nose-docstring-modifier plugin using pip:

$ pip install nose-docstring-modifier

Using

Given the following test function:

@attr(section='MySection', type='functional+', module='MyModule', id=1)
def test_function(self):
    """
    This is the original docstring
    """
    ok_(True)

running it with nosetest using nose-docstring-modifier plugin:

nosetest --with-docstring-modifier --prefix=id,section --suffix=type --replace=s,S

will print

(1, MySection) ThiS iS the original docString (functional+) ... ok

Features

  • Works with multiprocess plugin:

nosetest --processes=10 -- process-restartworker with-docstring-modifier --prefix=id

spreads test run among 10 processes, appending id attribute to each test.

History

0.0.5 (2014-11-24)

  • HOTFIX - Fixed a bug that caused an error when running the plugin due to dependency with another upcoming plugin

0.0.4 (2014-11-06)

  • Code design changes

0.0.3 (2014-11-05)

  • Multiprocessing support

0.0.2 (2014-11-04)

  • Initial release

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

nose-docstring-modifier-0.0.5.tar.gz (2.9 kB view details)

Uploaded Source

File details

Details for the file nose-docstring-modifier-0.0.5.tar.gz.

File metadata

File hashes

Hashes for nose-docstring-modifier-0.0.5.tar.gz
Algorithm Hash digest
SHA256 3d732ebaaa388c3a965d1fb4a149d3c4b7e5095bccb66fb853d874bd286f8b76
MD5 54dfb1f141926561ecc4ee8d60459e0c
BLAKE2b-256 dccdef742f3ab11ece5599c5f4957fc3b7d15aa1c41fbd740c7b6db51dac0e8b

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