Skip to content

Commit

Permalink
test #32 done
Browse files Browse the repository at this point in the history
  • Loading branch information
svandenb-dev committed Oct 17, 2024
1 parent 5b15568 commit af913ba
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
10 changes: 7 additions & 3 deletions src/pyedb/grpc/edb_core/hierarchy/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,10 +629,14 @@ def nets(self):
Returns
-------
list
List of Nets of Component.
list[str]
List of net name from component.
"""
return list(set([pin.net.name for pin in self.pinlist]))
nets = []
for pin in list(self.pins.values()):
if not pin.net.is_null:
nets.append(pin.net.name)
return list(set(nets))

@property
def pins(self):
Expand Down
6 changes: 4 additions & 2 deletions tests/grpc/system/test_edb_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,11 @@ def test_components_create_clearance_on_component(self, edb_examples):
assert comp.create_clearance_on_component()
edb.close()

def test_components_get_components_from_nets(self):
def test_components_get_components_from_nets(self, edb_examples):
"""Access to components from nets."""
assert self.edbapp.components.get_components_from_nets("DDR4_DQS0_P")
# Done
edb = edb_examples.get_si_verse()
assert edb.components.get_components_from_nets("DDR4_DQS0_P")

def test_components_resistors(self):
"""Evaluate the components resistors."""
Expand Down

0 comments on commit af913ba

Please sign in to comment.