Skip to content

Commit

Permalink
test #71 done
Browse files Browse the repository at this point in the history
  • Loading branch information
svandenb-dev committed Oct 25, 2024
1 parent a36a134 commit 5ff34fc
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions tests/grpc/system/test_edb_nets.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,22 @@

class TestClass:
@pytest.fixture(autouse=True)
def init(self, legacy_edb_app, local_scratch, target_path, target_path2, target_path4):
self.edbapp = legacy_edb_app
def init(self, local_scratch, target_path, target_path2, target_path4):
self.local_scratch = local_scratch
self.target_path = target_path
self.target_path2 = target_path2
self.target_path4 = target_path4

def test_nets_queries(self):
def test_nets_queries(self, edb_examples):
"""Evaluate nets queries"""
assert len(self.edbapp.nets.netlist) > 0
signalnets = self.edbapp.nets.signal
edbapp = edb_examples.get_si_verse()
assert len(edbapp.nets.netlist) > 0
signalnets = edbapp.nets.signal
assert not signalnets[list(signalnets.keys())[0]].is_power_ground
assert len(list(signalnets[list(signalnets.keys())[0]].primitives)) > 0
assert len(signalnets) > 2

powernets = self.edbapp.nets.power
powernets = edbapp.nets.power
assert len(powernets) > 2
assert powernets["AVCC_1V3"].is_power_ground
powernets["AVCC_1V3"].is_power_ground = False
Expand All @@ -62,14 +62,15 @@ def test_nets_queries(self):
assert len(list(powernets["AVCC_1V3"].components.keys())) > 0
assert len(powernets["AVCC_1V3"].primitives) > 0

assert self.edbapp.nets.find_or_create_net("GND")
assert self.edbapp.nets.find_or_create_net(start_with="gn")
assert self.edbapp.nets.find_or_create_net(start_with="g", end_with="d")
assert self.edbapp.nets.find_or_create_net(end_with="d")
assert self.edbapp.nets.find_or_create_net(contain="usb")
assert self.edbapp.nets["AVCC_1V3"].extended_net is None
self.edbapp.extended_nets.auto_identify_power()
assert self.edbapp.nets["AVCC_1V3"].extended_net
assert edbapp.nets.find_or_create_net("GND")
assert edbapp.nets.find_or_create_net(start_with="gn")
assert edbapp.nets.find_or_create_net(start_with="g", end_with="d")
assert edbapp.nets.find_or_create_net(end_with="d")
assert edbapp.nets.find_or_create_net(contain="usb")
assert edbapp.nets.nets["AVCC_1V3"].extended_net is None
edbapp.extended_nets.auto_identify_power()
assert edbapp.nets.nets["AVCC_1V3"].extended_net
edbapp.close()

def test_nets_get_power_tree(self):
"""Evaluate nets get powertree."""
Expand Down

0 comments on commit 5ff34fc

Please sign in to comment.