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

Method test_4

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

Source from the content-addressed store, hash-verified

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
502 # instantiate and register the library
503 tl = PCellTestLib()
504
505 lib = pya.Library.library_by_name("PCellTestLib")
506 pcell_decl_id = lib.layout().pcell_id("Box")
507
508 param = { "w": 4.0, "h": 8.0, "l": pya.LayerInfo(1, 0) }
509 pcell_var_id = lib.layout().add_pcell_variant(pcell_decl_id, param)
510
511 self.assertEqual(lib.layout().begin_shapes(pcell_var_id, lib.layout().layer(1, 0)).shape().__str__(), "box (-2000,-4000;2000,4000)")
512
513 def test_5(self):
514

Callers

nothing calls this directly

Calls 6

pcell_idMethod · 0.80
__str__Method · 0.80
PCellTestLibClass · 0.70
layoutMethod · 0.45
shapeMethod · 0.45
layerMethod · 0.45

Tested by

no test coverage detected