Skip to content

Commit

Permalink
test #60 done
Browse files Browse the repository at this point in the history
  • Loading branch information
svandenb-dev committed Oct 23, 2024
1 parent 1b76ec5 commit b4ecf82
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions tests/grpc/system/test_edb_modeler.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,23 +128,29 @@ def test_modeler_primitives_by_layer(self, edb_examples):
assert primmitive.can_be_zone_primitive
edbapp.close()

def test_modeler_primitives(self):
def test_modeler_primitives(self, edb_examples):
"""Evaluate modeler primitives"""
assert len(self.edbapp.modeler.rectangles) > 0
assert len(self.edbapp.modeler.circles) > 0
assert len(self.edbapp.layout.bondwires) == 0
assert "1_Top" in self.edbapp.modeler.polygons_by_layer.keys()
assert len(self.edbapp.modeler.polygons_by_layer["1_Top"]) > 0
assert len(self.edbapp.modeler.polygons_by_layer["DE1"]) == 0
assert self.edbapp.modeler.rectangles[0].type == "Rectangle"
assert self.edbapp.modeler.circles[0].type == "Circle"

def test_modeler_get_polygons_bounding(self):
# Done
edbapp = edb_examples.get_si_verse()
assert len(edbapp.modeler.rectangles) > 0
assert len(edbapp.modeler.circles) > 0
assert len(edbapp.layout.bondwires) == 0
assert "1_Top" in edbapp.modeler.polygons_by_layer.keys()
assert len(edbapp.modeler.polygons_by_layer["1_Top"]) > 0
assert len(edbapp.modeler.polygons_by_layer["DE1"]) == 0
assert edbapp.modeler.rectangles[0].type == "rectangle"
assert edbapp.modeler.circles[0].type == "circle"
edbapp.close()

def test_modeler_get_polygons_bounding(self, edb_examples):
"""Retrieve polygons bounding box."""
polys = self.edbapp.modeler.get_polygons_by_layer("GND")
# Done
edbapp = edb_examples.get_si_verse()
polys = edbapp.modeler.get_polygons_by_layer("GND")
for poly in polys:
bounding = self.edbapp.modeler.get_polygon_bounding_box(poly)
bounding = edbapp.modeler.get_polygon_bounding_box(poly)
assert len(bounding) == 4
edbapp.close()

def test_modeler_get_polygons_by_layer_and_nets(self):
"""Retrieve polygons by layer and nets."""
Expand Down

0 comments on commit b4ecf82

Please sign in to comment.