def getAllTestCases(self, root):
        cases = []
        counter = 0
        q = queue.PriorityQueue()

        q.put((0, counter, root))
        while (not q.empty()):
            c = q.get()[2]

            if (self.isExcluded(c)):
                continue
            if (not hasattr(c, '__subclasses__')):
                cases.append(c)
            else:
                for r in c.__subclasses__():
                    expansions = []
                    s = 0

                    counter += 1
                    if (self.exp.isExpansion(r)):
                        continue
                    if (len(r.__subclasses__()) != 0):
                        s += 100000
                    else:
                        rc = r
                        r = rc(self.fqdn, self.info)
                        if (not r.getCritical()):
                            if (r.getSeverity() == SEV_HIGH):
                                s += 100
                            elif (r.getSeverity() == SEV_MED):
                                s += 200
                            else:
                                s += 300
                        s += len(rc.__bases__)

                        expansions = self.exp.getExpansions(r)

                    q.put((s, counter, r))
                    for e in expansions:
                        s += 1
                        q.put((s, counter, e))

        counter = 0
        for c in cases:
            s = 1
            counter += 1
            if (c.getCritical()):
                s = 0
            q.put((s, counter, c))

        cases = []
        while (not q.empty()):
            cases.append(q.get()[2])

        return cases
dataset/ETHPy150Open yymax/x509test/src/TestSet.py/TestSet.getAllTestCases/original