Skip to content

Commit 07e6cba

Browse files
maxcapodi78maxcapodi78
maxcapodi78
authored and
maxcapodi78
committed
fixed unit test
1 parent 2b74119 commit 07e6cba

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

_unittest_solvers/test_00_analyze.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ def test_04h_3dl_get_all_return_loss_list(self):
389389
assert self.hfss3dl_solve.get_all_return_loss_list() == ["S(Port1,Port1)", "S(Port2,Port2)"]
390390

391391
def test_04i_3dl_get_all_insertion_loss_list(self):
392-
assert self.hfss3dl_solve.get_all_insertion_loss_list() == ["S(Port1,Port1)", "S(Port2,Port2)"]
392+
assert self.hfss3dl_solve.get_all_insertion_loss_list(tx_prefix="Port1", rx_prefix="Port2") == ['S(Port1,Port2)']
393393

394394
def test_04j_3dl_get_next_xtalk_list(self):
395395
assert self.hfss3dl_solve.get_next_xtalk_list() == ["S(Port1,Port2)"]

pyaedt/application/Analysis3DLayout.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ def get_all_insertion_loss_list(
319319
trlist = [i for i in list(self.excitations)]
320320

321321
if reclist is None:
322-
trlist = [i for i in list(self.excitations)]
322+
reclist = [i for i in list(self.excitations)]
323323
if tx_prefix:
324324
trlist = [i for i in trlist if i.startswith(tx_prefix)]
325325
if rx_prefix:
@@ -378,7 +378,7 @@ def get_next_xtalk_list(self, trlist=None, tx_prefix="", math_formula="", net_li
378378
"""
379379
next_xtalks = []
380380
if not trlist:
381-
trlist = [i for i in list(self.excitations.keys()) if tx_prefix in i]
381+
trlist = [i for i in list(self.excitations) if tx_prefix in i]
382382
for i in trlist:
383383
if not net_list or (net_list and [net for net in net_list if net in i]):
384384
k = trlist.index(i) + 1
@@ -444,9 +444,9 @@ def get_fext_xtalk_list(
444444

445445
fext = []
446446
if trlist is None:
447-
trlist = [i for i in list(self.excitations.keys()) if tx_prefix in i]
447+
trlist = [i for i in list(self.excitations) if tx_prefix in i]
448448
if reclist is None:
449-
reclist = [i for i in list(self.excitations.keys()) if rx_prefix in i]
449+
reclist = [i for i in list(self.excitations) if rx_prefix in i]
450450
for i in trlist:
451451
if not net_list or (net_list and [net for net in net_list if net in i]):
452452
for k in reclist:

0 commit comments

Comments
 (0)