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

Method test_5

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

Source from the content-addressed store, hash-verified

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
515 # instantiate and register the library
516 tl = PCellTestLib()
517
518 lib = pya.Library.library_by_name("PCellTestLib")
519 pcell_decl_id = lib.layout().pcell_id("Box")
520
521 param = { "w": 3.0, "h": 7.0, "l": pya.LayerInfo(2, 0) }
522 pcell_var_id = lib.layout().add_pcell_variant(pcell_decl_id, param)
523
524 self.assertEqual(lib.layout().begin_shapes(pcell_var_id, lib.layout().layer(2, 0)).shape().__str__(), "box (-1500,-3500;1500,3500)")
525
526
527 def test_6(self):

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