Pass the following two parameters when instantiating DtfCase objects:
Parameters: |
---|
DtfCase is a base class useful for implementing most dtf cases while requiring only limited familiarity with dtf internals.
Parameters: |
---|
Writes a test_spec in YAML format to a file specified by path. A thin wrapper around yaml.dump() method, with additional validation and formatting
When keys is not None, dump() will validate the keys in test_spec using validate(). Invalid test_specs always raise a DtfException.
A list of top-level keys in the test_spec dictionary. Cases will pass a list of keys to the required_keys() method after creating the object, but before calling. validate().
Parameters: | message (string) – A message to return. |
---|
A helper function that returns a message, tagged with name, if VERBOSE is true.
The name of the test, typically derived from the file name of the test itself.
A stub method, for the passing() method, that case definitions may implement. The intention of the passing() method is that, when called it will take the test_spec for the current test and return a passing variant that the developer/writer can use to update a fixed test.
Raises DtfNotImplemented.
A wrapper for passing() that: - adds comments to the output for increased clarity.
Parameters: | keys (list) – A list of top level keys that test_spec must have to be considered valid by validate(). |
---|
Currently does not implement recursive key checking.
Parameters: |
---|
A helper method that orchestrates test operation. Takes no arguments and preforms the folloing operations:
A stub method for the test() method, that case definitions must implement.
test() should return a two-tuple that contains:
A dictionary, passed to the class during object creation, that holds the test specification imported from the user-supplied YAML specification.
All arguments to the validate() method are optional, and if any arguments have the value of None validate() will substitute values from the object instance or user input values.
Parameters: |
|
---|
Checks the keys in each test specification to ensure that the test has the required keys.