Welcome to seamus’s documentation!

class seamus.Seamus(comparator=None, run_strategy=None)

Main class responsible for handling the test.

publish(is_equal)

Publish the results.

Parameters:is_equal – The value returned by self._comparator.
run()

Run the test.

Returns:Result of original_func
test(refactored_func, *args, **kwargs)

Sets the function that will be tested. The return value of this function will be compared to the actual result and publish called with the comparison made.

Parameters:
  • refactored_func – The function that is supposed to return the final result.
  • args – Will be passed to the refactored_func as arguments.
  • kwargs – Will be passed to the refactored_func as keyword arguments.
use(original_func, *args, **kwargs)

Sets the function that will actually be run. The return value of this function is what will actually be returned when the test is run.

Parameters:
  • original_func – The function that is supposed to return the final result.
  • args – Will be passed to the original_func as arguments.
  • kwargs – Will be passed to the original_func as keyword arguments.

Indices and tables