VFab2DReferenceTest

class ip_manager.testing.VFab2DReferenceTest

Test a 2D virtual fabrication material result against a known-good reference file.

Examples

from ip_manager.testing import VFab2DReferenceTest
from ipkiss.plugins.vfabrication.process_flow import VFabricationProcessFlow
import pytest

my_process_flow = VFabricationProcessFlow(...)

class TestMyVFab(VFab2DReferenceTest):
    @pytest.fixture
    def resolution(self):
        return 50   # 1/50 um grid

    @pytest.fixture
    def process_flow(self):
        return my_process_flow
resolution()

Fixture to configure the resolution of the virtual fabrication.

The grid of the virtual fabrication will be 1 / resolution user units. Defaults to 20 (hence, with user units in microns, the default grid is 50nm).

process_flow()

Fixture for configuring the virtual fabrication processs flow.

Defaults to TECH.VFABRICATION.PROCESS_FLOW.

material_stack_factory()

Fixture for configuring the material stack factory to use.

For advanced use only. Defaults to TECH.MATERIAL_STACKS.

material_array(component, resolution, process_flow, material_stack_factory)

Fixture returning the 2D material array to be tested.

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.

reference_folder(request, reference_folder_name)

Fixture returning the full reference folder path

Creates the necessary directories if they don’t exist. Should not be overridden (use ‘reference_folder_name’ instead).

reference_folder_name()

Fixture for configuring the relative folder path in which the known-good reference files are saved.

Defaults to ‘ref’

reference_name(request)

Fixture for configuring the reference file name, without the folder path.

Defaults to the class name of the test class. Should be overridden when defining parametrized tests!

temp_folder(request, temp_folder_name)

Fixture returning the full temporary folder path.

Creates the necessary directories if they don’t exist. Should not be overridden (use ‘temp_folder_name’ instead).

temp_folder_name(reference_folder_name)

Fixture specifying the relative folder path in which the temporary files are saved.

Defaults to be the same as reference_folder_name.