dimod.testing.asserts.assert_sampler_api#

assert_sampler_api(sampler)[source]#

Assert that an instantiated sampler exposes correct properties and methods.

Parameters:

sampler (Sampler) – User-made dimod sampler.

Raises:

AssertionError – If the given sampler does not match the sampler API.

See also

Sampler for the abstract base class that defines the sampler API.