IP Manager Reference¶
The following classes can be inherited to perform the described tests:
||Test LayoutView, NetlistView and CircuitModelView of a component against known-good reference files.|
||Abstract base class for testing the CircuitModelView|
||Test a 2D virtual fabrication material result against a known-good reference file.|
||Test that the netlist (terms, instances, nets) extracted from the LayoutView matches the NetlistView.|
Component reference tests¶
ip_manager.testing.ComponentReferenceTest groups a range of different tests against known-good reference files.
The tests to need to be selected by marking the class with the tests to run using pytest.mark.comparisons:
from ip_manager.testing import ComponentReferenceTest, Compare @pytest.mark.comparisons([Compare.LayoutToGds, Compare.GdsToGds, Compare.LayoutToXML, Compare.LayoutDrawingToXML]) class TestMyComponent(testing.ComponentReferenceTest): @pytest.fixture def component(self): # create component here
The available test configurations in the Compare object are:
- Compare.LayoutToGds: compare the LayoutView to a reference GDSII file, without GDSII filters (TECH.GDISI.FILTER) applied.
- Compare.GdsToGds: export a GDSII of the LayoutView, read it back in and compare with a reference GDS.
- Compare.LayoutToXML: export the LayoutView to an XML and compare with a reference XML.
- Compare.LayoutDrawingToXML: export the Layout elements to XML file, without port information and without the GDSII filters applied, and compare with a reference XML.
- Compare.NetlistToXML: export the NetlistView to an XML and compare with a reference XML.
- Compare.SMatrix: compare the S-matrix from a CircuitModelView in a given wavelength range to a reference S-matrix file.
||Tools for conveniently testing an S-matrix as part of regression tests.|