Skip to content

Commit

Permalink
test #67 done
Browse files Browse the repository at this point in the history
  • Loading branch information
svandenb-dev committed Oct 24, 2024
1 parent 80ca1ac commit c1b4261
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/pyedb/grpc/edb_core/primitive/primitive.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ def layer_name(self):

@layer_name.setter
def layer_name(self, value):
self.layer.name = value
if value in self._pedb.stackup.layers:
self.layer = self._pedb.stackup.layers[value]

@property
def polygon_data(self):
Expand Down
11 changes: 5 additions & 6 deletions tests/grpc/system/test_edb_modeler.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ def test_156_check_path_length(self):
edbapp.close_edb()

def test_duplicate(self):
# TODO fix variables before
edbapp = Edb()
edbapp["$H"] = "0.65mil"
assert edbapp["$H"].value_string == "0.65mil"
Expand Down Expand Up @@ -471,6 +472,7 @@ def test_duplicate(self):
edbapp.close()

def test_unite_polygon(self):
# TODO fix variables before
edbapp = Edb()
edbapp["$H"] = "0.65mil"
edbapp["Via_S"] = "40mil"
Expand Down Expand Up @@ -514,12 +516,9 @@ def test_unite_polygon(self):
assert len(edbapp.modeler.polygons) == 1
edbapp.close()

def test_layer_name(self):
example_folder = os.path.join(local_path, "example_models", test_subfolder)
source_path_edb = os.path.join(example_folder, "ANSYS-HSD_V1.aedb")
target_path_edb = os.path.join(self.local_scratch.path, "test_create_polygon", "test.aedb")
self.local_scratch.copyfolder(source_path_edb, target_path_edb)
edbapp = Edb(target_path_edb, desktop_version)
def test_layer_name(self, edb_examples):
# Done
edbapp = edb_examples.get_si_verse()
assert edbapp.modeler.polygons[50].layer_name == "1_Top"
edbapp.modeler.polygons[50].layer_name = "16_Bottom"
assert edbapp.modeler.polygons[50].layer_name == "16_Bottom"
Expand Down

0 comments on commit c1b4261

Please sign in to comment.