MCPcopy Create free account
hub / github.com/KLayout/klayout / test_3

Method test_3

testdata/python/dbPCells.py:480–498  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

478 self.assertEqual(ly.begin_shapes(pcell_inst.cell_index, li1).shape().__str__(), "box (-500,-100;500,100)")
479
480 def test_3(self):
481
482 # instantiate and register the library
483 tl = PCellTestLib()
484
485 ly = pya.Layout(True)
486 ly.dbu = 0.01
487
488 c1 = ly.create_cell("c1")
489
490 lib = pya.Library.library_by_name("PCellTestLib")
491 pcell_decl_id = lib.layout().pcell_id("Box")
492
493 param = { "w": 4.0, "h": 8.0, "l": pya.LayerInfo(1, 0) }
494 pcell_var_id = ly.add_pcell_variant(lib, pcell_decl_id, param)
495 pcell_var = ly.cell(pcell_var_id)
496 pcell_inst = c1.insert(pya.CellInstArray(pcell_var_id, pya.Trans()))
497
498 self.assertEqual(ly.begin_shapes(c1.cell_index(), ly.layer(1, 0)).shape().__str__(), "box (-200,-400;200,400)")
499
500 def test_4(self):
501

Callers

nothing calls this directly

Calls 11

LayoutMethod · 0.80
pcell_idMethod · 0.80
__str__Method · 0.80
PCellTestLibClass · 0.70
create_cellMethod · 0.45
layoutMethod · 0.45
cellMethod · 0.45
insertMethod · 0.45
shapeMethod · 0.45
cell_indexMethod · 0.45
layerMethod · 0.45

Tested by

no test coverage detected