diff --git a/test/ProfileManager2_test.py b/test/ProfileManager2_test.py index 27e90d0..ee89368 100644 --- a/test/ProfileManager2_test.py +++ b/test/ProfileManager2_test.py @@ -6501,6 +6501,8 @@ def test_switchProfile_importMntGrp(self): "data_type": types, "synchronizer": {}, "synchronization": {}, + "value_ref_enabled": {}, + "value_ref_pattern": {}, "shape": shapes } ) diff --git a/test/ProfileManager3_test.py b/test/ProfileManager3_test.py index 765ccf3..4a83ebd 100644 --- a/test/ProfileManager3_test.py +++ b/test/ProfileManager3_test.py @@ -6507,6 +6507,8 @@ def test_switchProfile_importMntGrp(self): "data_type": types, "synchronizer": {}, "synchronization": {}, + "value_ref_enabled": {}, + "value_ref_pattern": {}, "shape": shapes } ) diff --git a/test/ProfileManager_test.py b/test/ProfileManager_test.py index 8e0a05b..c4e6511 100644 --- a/test/ProfileManager_test.py +++ b/test/ProfileManager_test.py @@ -1843,15 +1843,16 @@ def compareToDumpJSON(self, el, excluded=None, name="default"): w1 = json.loads(self.__dump[name][key]) w2 = json.loads(el[key]) except Exception: - # if self.__dump[name][key] != el[key]: - # print key + if self.__dump[name][key] != el[key]: + print(key) self.assertEqual(self.__dump[name][key], el[key]) else: if isinstance(w1, dict): self.myAssertDict(w1, w2) else: - # if self.__dump[name][key] != el[key]: - # print "COMP", key + if self.__dump[name][key] != el[key]: + if sys.version_info > (3,): + print("COMP", key) self.assertEqual(self.__dump[name][key], el[key]) def getRandomName(self, maxsize): @@ -1882,15 +1883,17 @@ def myAssertDict(self, dct, dct2): logger.debug('dict %s' % type(dct)) logger.debug("\n%s\n%s" % (dct, dct2)) self.assertTrue(isinstance(dct, dict)) - # if not isinstance(dct2, dict): - # print "NOT DICT", type(dct2), dct2 - # print "DICT", type(dct), dct + if not isinstance(dct2, dict): + if sys.version_info > (3,): + print("NOT DICT", type(dct2), dct2) + print("DICT", type(dct), dct) self.assertTrue(isinstance(dct2, dict)) logger.debug("%s %s" % (len(list(dct.keys())), len(list(dct2.keys())))) - # if set(dct.keys()) ^ set(dct2.keys()): - # print 'DCT', dct.keys() - # print 'DCT2', dct2.keys() - # print "DIFF", set(dct.keys()) ^ set(dct2.keys()) + if set(dct.keys()) ^ set(dct2.keys()): + if sys.version_info > (3,): + print('DCT', dct.keys()) + print('DCT2', dct2.keys()) + print("DIFF", set(dct.keys()) ^ set(dct2.keys())) self.assertEqual(len(list(dct.keys())), len(list(dct2.keys()))) for k, v in dct.items(): logger.debug("%s in %s" % (str(k), str(dct2.keys()))) @@ -1899,8 +1902,9 @@ def myAssertDict(self, dct, dct2): self.myAssertDict(v, dct2[k]) else: logger.debug("%s , %s" % (str(v), str(dct2[k]))) - # if v != dct2[k]: - # print 'VALUES!! ', k, v, dct2[k] + if v != dct2[k]: + if sys.version_info > (3,): + print('VALUES!! ', k, v, dct2[k]) self.assertEqual(v, dct2[k]) def myCompDict(self, dct, dct2): @@ -6656,6 +6660,8 @@ def test_switchProfile_importMntGrp(self): "data_type": types, "synchronizer": {}, "synchronization": {}, + "value_ref_enabled": {}, + "value_ref_pattern": {}, "shape": shapes } ) @@ -6961,11 +6967,13 @@ def test_switchProfile_importMntGrp(self): self.myAssertRaise(Exception, lmgt.isMntGrpUpdated) lmgt.switchProfile(False) + self.compareToDumpJSON( lse, [ "DataSourceSelection", "UnplottedComponents", "PreselectingDataSources", + # "ChannelProperties", "Timer" ], name=mg1) @@ -6974,10 +6982,6 @@ def test_switchProfile_importMntGrp(self): ltmpcf = json.loads(lmgt.mntGrpConfiguration()) self.myAssertDict(tmpcf, ltmpcf) - self.assertEqual( - set(json.loads(lse["PreselectingDataSources"])), - set(aadss[mg1])) - # adtimers = set( json.loads(lse["Timer"])) - set(ltimers[mg1]) @@ -7020,6 +7024,7 @@ def test_switchProfile_importMntGrp(self): se[mg2], ["DataSourceSelection", "UnplottedComponents", + # "ChannelProperties", "OrderedChannels", # IMPROVE "PreselectingDataSources"], name=mg2) @@ -7036,6 +7041,7 @@ def test_switchProfile_importMntGrp(self): ["DataSourceSelection", "UnplottedComponents", "OrderedChannels", # IMPROVE + # "ChannelProperties", "PreselectingDataSources", "Timer", "MntGrp"], @@ -7200,6 +7206,7 @@ def test_switchProfile_importMntGrp(self): "DataSourceSelection", "UnplottedComponents", "OrderedChannels", # IMPROVE + # "ChannelProperties", "PreselectingDataSources", "Timer", "MntGrp"], @@ -7213,7 +7220,7 @@ def test_switchProfile_importMntGrp(self): "ComponentSelection", "DataSourceSelection", "UnplottedComponents", - "ChannelProperties", + # "ChannelProperties", "PreselectingDataSources", "Timer"], name=mg2) @@ -7289,6 +7296,7 @@ def test_switchProfile_importMntGrp(self): [ "DataSourceSelection", "UnplottedComponents", + # "ChannelProperties", "PreselectingDataSources", "Timer"], name=mg3) @@ -7338,6 +7346,7 @@ def test_switchProfile_importMntGrp(self): "DataSourceSelection", "UnplottedComponents", "PreselectingDataSources", + # "ChannelProperties", "Timer", "MntGrp"], name=mg3) @@ -7402,6 +7411,7 @@ def test_switchProfile_importMntGrp(self): [ "DataSourceSelection", "UnplottedComponents", + # "ChannelProperties", "PreselectingDataSources", "Timer"], name=mg3) @@ -7452,6 +7462,7 @@ def test_switchProfile_importMntGrp(self): lse, [ "DataSourceSelection", + # "ChannelProperties", "UnplottedComponents", "PreselectingDataSources", "Timer"], @@ -7500,6 +7511,7 @@ def test_switchProfile_importMntGrp(self): [ "DataSourceSelection", "UnplottedComponents", + # "ChannelProperties", "PreselectingDataSources", "Timer"], name=mg3) @@ -7541,6 +7553,7 @@ def test_switchProfile_importMntGrp(self): [ "DataSourceSelection", "UnplottedComponents", + # "ChannelProperties", "PreselectingDataSources", "Timer", "MntGrp"], name=mg3) @@ -7595,6 +7608,7 @@ def test_switchProfile_importMntGrp(self): "Timer", "MntGrp", "OrderedChannels", + # "ChannelProperties", "ComponentSelection", "DataSourceSelection", "UnplottedComponents",