mate.assertions module

Specialized assertion behavior for the MATE server.

exception mate.assertions.BuildAssertionError(message: str, build_id: str)

Bases: mate_common.assertions.RuntimeAssertionError

An exception class for build-time assertions in MATE.

A “build-time” assertion is one during the CPG build processes.

Parameters
  • message (str) –

  • build_id (str) –

Return type

None

build_id: str
message: str
exception mate.assertions.CompilationAssertionError(message: str, compilation_id: str)

Bases: mate_common.assertions.RuntimeAssertionError

An exception class for compilation-time assertions in MATE.

A “compilation-time” assertion is one during the compilation phase, i.e. before any CPG build processes.

Parameters
  • message (str) –

  • compilation_id (str) –

Return type

None

compilation_id: str
message: str
mate.assertions.build_assert(condition: bool, msg: str, *, build_id: str) None

Assert an unexpected condition during CPG construction.

These assertions will cause their corresponding db.Build to be put into a “failed” state when used with the server. When used with the MATE CLI, they cause a process termination.

Parameters
  • condition (bool) –

  • msg (str) –

  • build_id (str) –

Return type

None

mate.assertions.compilation_assert(condition: bool, msg: str, *, compilation_id: str) None
Parameters
  • condition (bool) –

  • msg (str) –

  • compilation_id (str) –

Return type

None