Skip to content

popas90/nose-switch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

This is a nose plugin that allows you to add special switches in code, based on options set when running nose tests.

For calling the plugin, use any of the following:

$ nosetests -S <switch_string>
$ nosetests -S<switch_string>
$ nosetests --switch=<switch_string>
$ nosetests --switch <switch_string>

Example:

  • import package into project:
  from nose_switch import *
  • now, you can use the switch_on(string) method, which returns True or False, if that string was used as a parameter when running the tests:
nose_switch.switch_on('debug') # returns True or False
  • when running the tests, use:
$ nosetests -S debug
  • you can also add multiple switches:
$ nosetests -S sw1 -S sw2 -S sw3

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages