Prepare suite and determine test ordering

def prepare_suite(self, suite):
        """Prepare suite and determine test ordering"""
        all_tests = {}
        for s in suite:
            m = re.match(r'(\w+)\s+\(.+\)', str(s))
            if m:
                name = m.group(1)
            else:
                name = str(s).split('.')[-1]
            all_tests[name] = s

        return self.orderTests(all_tests, suite)