def test_ddt_class_decorator(self):
        """Classes with DDT-decorated functions have ddt.ddt class decorator.

        """
        errors = []

        for dirname, dirnames, filenames in os.walk(self.tests_path):
            for filename in filenames:
                if not (filename.startswith("test_") and
                        filename.endswith(".py")):
                    continue

                filename = os.path.relpath(os.path.join(dirname, filename))

                with open(filename, "rb") as fh:
                    try:
                        tree = ast.parse(fh.read(), filename)
                    except __HOLE__ as err:
                        errors.append({"message": str(err),
                                       "filename": filename,
                                       "lineno": -1})

                visitor = DDTDecoratorChecker()
                visitor.visit(tree)
                errors.extend(
                    dict(filename=filename, **error)
                    for error in visitor.errors.values())

        if errors:
            msg = [""]
            for error in errors:
                msg.extend([
                    "Errors at %(filename)s line %(lineno)d: %(message)s" % {
                        "message": error["message"],
                        "filename": error["filename"],
                        "lineno": error["lineno"]},
                    ""])
            self.fail("\n".join(msg))
dataset/ETHPy150Open openstack/rally/tests/unit/test_ddt.py/DDTDecoratorCheckerTestCase.test_ddt_class_decorator