STDLIB Testing Fixture Function Reference

Index

_testing.fixtures.debug.diff

Prints a diff between two values for debugging.

  • STDLIB_TESTING_THEME_DEBUG_FIXTURE string global: The colour to use for the debug output (default=”GREY”).

Arguments

  • $1 (string): The expected value.

  • $2 (string): The actual value.

Exit codes

  • 0: If the values match.

  • 1: If the values do not match.

Output on stdout

  • The debug diff output.

_testing.fixtures.mock.logger

Creates mocks for all stdlib.logger functions.

Function has no arguments.

Exit codes

  • 0: If the logger mocks were created successfully.

  • 126: If an invalid argument has been provided.

  • 127: If the wrong number of arguments were provided.

Output on stdout

  • The informational messages.

Output on stderr

  • The error message if the operation fails.

_testing.fixtures.random.name

Generates a random alphanumeric name.

Arguments

  • $1 (integer): (optional, default=50) The length of the name to generate.

Exit codes

  • 0: If the random name was generated.

Output on stdout

  • The generated random name.