Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jkotan committed Feb 5, 2025
1 parent 55d39a2 commit 700f819
Show file tree
Hide file tree
Showing 12 changed files with 106 additions and 104 deletions.
4 changes: 2 additions & 2 deletions nxsrecconfig/ProfileManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1509,7 +1509,7 @@ def __addChannel(cls, cnf, ctrl, device, fullname, dontdisplay, index,
if device in dontdisplay:
dct['plot_axes'] = []
dct['plot_type'] = 0
dct['ndim'] = 0
dct['ndim'] = len(dct['shape'] or [])
elif dct['shape'] and len(dct['shape']) == 1:
dct['plot_axes'] = ['<idx>']
dct['plot_type'] = 1
Expand Down Expand Up @@ -1589,7 +1589,7 @@ def __addTangoChannel(cls, cnf, ctrl, device, record, dontdisplay, index):
if device in dontdisplay:
dct['plot_axes'] = []
dct['plot_type'] = 0
dct['ndim'] = 0
dct['ndim'] = len(dct['shape'] or [])
elif dct['shape'] and len(dct['shape']) == 1:
dct['plot_axes'] = ['<idx>']
dct['plot_type'] = 1
Expand Down
16 changes: 8 additions & 8 deletions test/BasicSettings2_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12824,7 +12824,7 @@ def test_updateMntGrp_components_nopool_tango(self):
for i, ds in enumerate(chds):
cnt = self.smychs[str(ds)]
try:
chn = {'ndim': 0,
chn = {'ndim': len(cnt['shape']),
'index': i,
'name': str(ds),
'data_type': cnt['data_type'],
Expand Down Expand Up @@ -13089,7 +13089,7 @@ def test_updateMntGrp_components_nopool_tango_unplottedcomponents(self):
for i, ds in enumerate(chds):
cnt = self.smychs[str(ds)]
try:
chn = {'ndim': 0,
chn = {'ndim': len(cnt['shape']),
'index': i,
'name': str(ds),
'data_type': cnt['data_type'],
Expand Down Expand Up @@ -13391,7 +13391,7 @@ def test_updateMntGrp_components_pool_tango(self):
if i < idmax:
idmax = i
ttdv = tdv
chn = {'ndim': 0,
chn = {'ndim': len(cnt['shape']),
'index': i,
'name': str(ds),
'data_type': cnt['data_type'],
Expand Down Expand Up @@ -13725,7 +13725,7 @@ def test_updateMntGrp_components_pool_tango_unplottedcomponents(self):
if i < idmax:
idmax = i
ttdv = tdv
chn = {'ndim': 0,
chn = {'ndim': len(cnt['shape']),
'index': i,
'name': str(ds),
'data_type': cnt['data_type'],
Expand Down Expand Up @@ -14075,7 +14075,7 @@ def test_updateMntGrp_components_mixed_tango_unplottedcomponents(self):
if i < idmax:
idmax = i
ttdv = tdv
chn = {'ndim': 0,
chn = {'ndim': len(cnt['shape']),
'index': i,
'name': str(ds),
'data_type': cnt['data_type'],
Expand Down Expand Up @@ -14115,7 +14115,7 @@ def test_updateMntGrp_components_mixed_tango_unplottedcomponents(self):
i = chds.index(str(ds))
# print "INDEX", i, ds
try:
chn = {'ndim': 0,
chn = {'ndim': len(cnt['shape']),
'index': i,
'name': str(ds),
'data_type': cnt['data_type'],
Expand Down Expand Up @@ -14489,7 +14489,7 @@ def test_updateMntGrp_components_mixed_tango_orderedchannels(self):
if i < idmax:
idmax = i
ttdv = tdv
chn = {'ndim': 0,
chn = {'ndim': len(cnt['shape']),
'index': i,
'name': str(ds),
'data_type': cnt['data_type'],
Expand Down Expand Up @@ -14529,7 +14529,7 @@ def test_updateMntGrp_components_mixed_tango_orderedchannels(self):
i = chds.index(str(ds))
# print "INDEX", i, ds
try:
chn = {'ndim': 0,
chn = {'ndim': len(cnt['shape']),
'index': i,
'name': str(ds),
'data_type': cnt['data_type'],
Expand Down
16 changes: 8 additions & 8 deletions test/BasicSettings3_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12822,7 +12822,7 @@ def test_updateMntGrp_components_nopool_tango(self):
i = 0
cnt = self.smychs[str(ds)]
try:
chn = {'ndim': 0,
chn = {'ndim': len(cnt['shape']),
'index': i,
'name': str(ds),
'data_type': cnt['data_type'],
Expand Down Expand Up @@ -13091,7 +13091,7 @@ def test_updateMntGrp_components_nopool_tango_unplottedcomponents(self):
i = 0
cnt = self.smychs[str(ds)]
try:
chn = {'ndim': 0,
chn = {'ndim': len(cnt['shape']),
'index': i,
'name': str(ds),
'data_type': cnt['data_type'],
Expand Down Expand Up @@ -13401,7 +13401,7 @@ def test_updateMntGrp_components_pool_tango(self):
if i < idmax:
idmax = i
ttdv = tdv
chn = {'ndim': 0,
chn = {'ndim': len(cnt['shape']),
'index': i,
'name': str(ds),
'data_type': cnt['data_type'],
Expand Down Expand Up @@ -13740,7 +13740,7 @@ def test_updateMntGrp_components_pool_tango_unplottedcomponents(self):
if i < idmax:
idmax = i
ttdv = tdv
chn = {'ndim': 0,
chn = {'ndim': len(cnt['shape']),
'index': i,
'name': str(ds),
'data_type': cnt['data_type'],
Expand Down Expand Up @@ -14095,7 +14095,7 @@ def test_updateMntGrp_components_mixed_tango_unplottedcomponents(self):
if i < idmax:
idmax = i
ttdv = tdv
chn = {'ndim': 0,
chn = {'ndim': len(cnt['shape']),
'index': i,
'name': str(ds),
'data_type': cnt['data_type'],
Expand Down Expand Up @@ -14140,7 +14140,7 @@ def test_updateMntGrp_components_mixed_tango_unplottedcomponents(self):
if i > cri:
i = i + 1
try:
chn = {'ndim': 0,
chn = {'ndim': len(cnt['shape']),
'index': i,
'name': str(ds),
'data_type': cnt['data_type'],
Expand Down Expand Up @@ -14518,7 +14518,7 @@ def test_updateMntGrp_components_mixed_tango_orderedchannels(self):
if i < idmax:
idmax = i
ttdv = tdv
chn = {'ndim': 0,
chn = {'ndim': len(cnt['shape']),
'index': i,
'name': str(ds),
'data_type': cnt['data_type'],
Expand Down Expand Up @@ -14564,7 +14564,7 @@ def test_updateMntGrp_components_mixed_tango_orderedchannels(self):
i = i + 1
# print "INDEX", i, ds
try:
chn = {'ndim': 0,
chn = {'ndim': len(cnt['shape']),
'index': i,
'name': str(ds),
'data_type': cnt['data_type'],
Expand Down
19 changes: 9 additions & 10 deletions test/BasicSettings_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12822,7 +12822,7 @@ def test_updateMntGrp_components_nopool_tango_masterfirst(self):
i = 0
cnt = self.smychs[str(ds)]
try:
chn = {'ndim': 0,
chn = {'ndim': len(cnt['shape']),
'index': i,
'name': str(ds),
'data_type': cnt['data_type'],
Expand Down Expand Up @@ -13054,7 +13054,7 @@ def test_updateMntGrp_components_nopool_tango(self):
for i, ds in enumerate(chds):
cnt = self.smychs[str(ds)]
try:
chn = {'ndim': 0,
chn = {'ndim': len(cnt['shape']),
'index': i,
'name': str(ds),
'data_type': cnt['data_type'],
Expand Down Expand Up @@ -13323,7 +13323,7 @@ def test_updateMntGrp_components_nopool_tango_unplottedcomponents(self):
for i, ds in enumerate(chds):
cnt = self.smychs[str(ds)]
try:
chn = {'ndim': 0,
chn = {'ndim': len(cnt['shape']),
'index': i,
'name': str(ds),
'data_type': cnt['data_type'],
Expand Down Expand Up @@ -13629,7 +13629,7 @@ def test_updateMntGrp_components_pool_tango(self):
if i < idmax:
idmax = i
ttdv = tdv
chn = {'ndim': 0,
chn = {'ndim': len(cnt['shape']),
'index': i,
'name': str(ds),
'data_type': cnt['data_type'],
Expand Down Expand Up @@ -13965,7 +13965,7 @@ def test_updateMntGrp_components_pool_tango_unplottedcomponents(self):
if i < idmax:
idmax = i
ttdv = tdv
chn = {'ndim': 0,
chn = {'ndim': len(cnt['shape']),
'index': i,
'name': str(ds),
'data_type': cnt['data_type'],
Expand Down Expand Up @@ -14318,7 +14318,7 @@ def test_updateMntGrp_components_mixed_tango_unplottedcomponents(self):
if i < idmax:
idmax = i
ttdv = tdv
chn = {'ndim': 0,
chn = {'ndim': len(cnt['shape']),
'index': i,
'name': str(ds),
'data_type': cnt['data_type'],
Expand Down Expand Up @@ -14360,7 +14360,7 @@ def test_updateMntGrp_components_mixed_tango_unplottedcomponents(self):
i = chds.index(str(ds))
# print "INDEX", i, ds
try:
chn = {'ndim': 0,
chn = {'ndim': len(cnt['shape']),
'index': i,
'name': str(ds),
'data_type': cnt['data_type'],
Expand Down Expand Up @@ -14736,7 +14736,7 @@ def test_updateMntGrp_components_mixed_tango_orderedchannels(self):
if i < idmax:
idmax = i
ttdv = tdv
chn = {'ndim': 0,
chn = {'ndim': len(cnt['shape']),
'index': i,
'name': str(ds),
'data_type': cnt['data_type'],
Expand Down Expand Up @@ -14778,7 +14778,7 @@ def test_updateMntGrp_components_mixed_tango_orderedchannels(self):
i = chds.index(str(ds))
# print "INDEX", i, ds
try:
chn = {'ndim': 0,
chn = {'ndim': len(cnt['shape']),
'index': i,
'name': str(ds),
'data_type': cnt['data_type'],
Expand Down Expand Up @@ -14820,7 +14820,6 @@ def test_updateMntGrp_components_mixed_tango_orderedchannels(self):
"description": "Measurement Group",
"timer": "%s" % dv,
"label": "mg2"}
# print "SMG", smg
self.myAssertDict(smg, pcnf)
self.myAssertDict(pcnf, cnf)
rs.mntGrp = "nxsmntgrp"
Expand Down
16 changes: 8 additions & 8 deletions test/ExtraSettings2_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ def test_updateMntGrp_components_mixed_tango_timers(self):
if i < idmax:
idmax = i
ttdv = tdv
chn = {'ndim': 0,
chn = {'ndim': len(cnt['shape']),
'index': i,
'name': str(ds),
'data_type': cnt['data_type'],
Expand Down Expand Up @@ -511,7 +511,7 @@ def test_updateMntGrp_components_mixed_tango_timers(self):
i = chds.index(str(ds))
# print "INDEX", i, ds
try:
chn = {'ndim': 0,
chn = {'ndim': len(cnt['shape']),
'index': i,
'name': str(ds),
'data_type': cnt['data_type'],
Expand Down Expand Up @@ -969,7 +969,7 @@ def test_updateMntGrp_mntGrpConfiguration_isMntGrpUpdated(self):
if i < idmax:
idmax = i
ttdv = tdv
chn = {'ndim': 0,
chn = {'ndim': len(cnt['shape']),
'index': i,
'name': str(ds),
'data_type': cnt['data_type'],
Expand Down Expand Up @@ -1020,7 +1020,7 @@ def test_updateMntGrp_mntGrpConfiguration_isMntGrpUpdated(self):
i = chds.index(str(ds))
# print "INDEX", i, ds
try:
chn = {'ndim': 0,
chn = {'ndim': len(cnt['shape']),
'index': i,
'name': str(ds),
'data_type': cnt['data_type'],
Expand Down Expand Up @@ -1552,7 +1552,7 @@ def subtest_switchProfile_importMntGrp(self):
if i < idmax:
idmax = i
ttdv = tdv
chn = {'ndim': 0,
chn = {'ndim': len(cnt['shape']),
'index': i,
'name': str(ds),
'data_type':
Expand Down Expand Up @@ -1605,7 +1605,7 @@ def subtest_switchProfile_importMntGrp(self):
i = chds.index(str(ds))
# print "INDEX", i, ds
try:
chn = {'ndim': 0,
chn = {'ndim': len(cnt['shape']),
'index': i,
'name': str(ds),
'data_type': cnt['data_type'],
Expand Down Expand Up @@ -2964,7 +2964,7 @@ def test_myswitchProfile_importMntGrp(self):
if i < idmax:
idmax = i
ttdv = tdv
chn = {'ndim': 0,
chn = {'ndim': len(cnt['shape']),
'index': i,
'name': str(ds),
'data_type':
Expand Down Expand Up @@ -3017,7 +3017,7 @@ def test_myswitchProfile_importMntGrp(self):
i = chds.index(str(ds))
# print "INDEX", i, ds
try:
chn = {'ndim': 0,
chn = {'ndim': len(cnt['shape']),
'index': i,
'name': str(ds),
'data_type': cnt['data_type'],
Expand Down
Loading

0 comments on commit 700f819

Please sign in to comment.