scverse_backends.testing.run_conformance#
- scverse_backends.testing.run_conformance(*, backend_name, tests, get_backend, functions=None, raise_on_failure=True)[source]#
Run host-supplied feedback checks against a backend.
- Parameters:
- backend_name
str Name or alias of the backend to test.
- tests
dict[str,Callable[[str],None]] Mapping
{function_name: test_callable}. The callable receives the backend name and is expected to assert behavior internally (e.g. vianp.testing.assert_allclose).- get_backend
Callable[[str],Any|None] The host’s
get_backendfunction (typicallydispatcher.get_backend). Used to resolve aliases and to skip tests for functions the backend doesn’t implement.- functions
Sequence[str] |None, default:None Restrict the run to specific function names.
Noneruns every test.- raise_on_failure
bool, default:True If True (default), re-raise the first test failure after recording it.
- backend_name
- Return type:
- Returns:
Dict mapping function name to
"PASSED","SKIPPED (...)", or"FAILED: ...".