From 5ff34fcfb82127f8ddcfd394db5756f9db7d72ad Mon Sep 17 00:00:00 2001 From: svandenb-dev Date: Fri, 25 Oct 2024 11:55:42 +0200 Subject: [PATCH] test #71 done --- tests/grpc/system/test_edb_nets.py | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/tests/grpc/system/test_edb_nets.py b/tests/grpc/system/test_edb_nets.py index 0a332a6976..a8633b9546 100644 --- a/tests/grpc/system/test_edb_nets.py +++ b/tests/grpc/system/test_edb_nets.py @@ -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 @@ -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."""