CircuitModelTest

class ip_manager.testing.CircuitModelTest

Abstract base class for testing the CircuitModelView

Provides fixtures for custom higher level tests with S-models to ensure circuit behaviour stays correct. This test does not require a reference file.

circuitmodel(component)

Fixture returning the circuit model view to be tested.

Defaults to the default CircuitModelView of component.

smatrix(circuitmodel, wavelengths)

Fixture returning the S-matrix calculated from ‘circuitmodel’.

Calls get_smatrix() on circuitmodel. Uses the wavelengths fixture, which needs to be defined by the user.

wavelengths()

Fixture specifying the wavelength array for which to generate the smatrix fixture.

Takes the form of a numpy array or a list. Needs to be overriden by the user.

plot_terms()

Fixture specifying a list of term links to be plotted in the HTML report in case of failed tests.

plot_dB_range()

Fixture specifying the power [dB] range, for example: (-20.0, 0.0).

An empty tuple or ‘False’ means that a linear scale will be employed instead of a dB-scale.

Note that ‘autouse=True’ should always be supplied!

abstract component()

Fixture returning the component (i3.PCell object) to be tested.

Needs to be implemented by the user.

library_name(component)

Fixture specifying the library name to use in the files.

Defaults to component.name.