def test_purge_duplicate_comments(self):
        self.explore(self.traj)

        with self.assertRaises(RuntimeError):
            self.traj.hdf5.purge_duplicate_comments = 1
            self.traj.overview.results_summary = 0
            self.make_run()

        self.traj.f_get('purge_duplicate_comments').f_unlock()
        self.traj.hdf5.purge_duplicate_comments=1
        self.traj.f_get('results_summary').f_unlock()
        self.traj.overview.results_summary=1
        self.make_run()


        hdf5file = pt.openFile(self.filename, mode='a')

        ncomments = {}

        try:
            traj_group = hdf5file.getNode(where='/',name= self.traj.v_name)


            for node in traj_group._f_walkGroups():
                if ('/derived_parameters/' in node._v_pathname or
                    node._v_pathname in '/results/'):
                    if 'SRVC_LEAF' in node._v_attrs:
                        if 'SRVC_INIT_COMMENT' in node._v_attrs:
                            comment = node._v_attrs['SRVC_INIT_COMMENT']
                            if comment not in ncomments:
                                ncomments[comment] = 0
                            ncomments[comment] += 1
        finally:
            hdf5file.close()

        self.assertGreaterEqual(len(ncomments), 1)
        self.assertTrue(all(x == 1 for x in ncomments.values()))
dataset/ETHPy150Open SmokinCaterpillar/pypet/pypet/tests/integration/environment_test.py/EnvironmentTest.test_purge_duplicate_comments/swapped operands of `in`