The test_cli_context Module

class MadeUpContext[source]

Creates a new object

Parameters
  • subclass – A concrete class containing configuration information Configuration options must be defined as class memebers with names, starting with one ‘_’ characters and values be instances of :class Argument:

  • description – Optional text to use as description. If not specified, then it is extracted from subclass documentation

validate(attr, value)[source]

Subclasses can override this method to implement custom handling of command line arguments

Parameters
  • attr – Command line argument name

  • value – Value returned by argparse

Returns

value to use

class MyTestCase(methodName='runTest')[source]

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

test_default_context()[source]
test_custom_validate()[source]