@@ -0,0 +1,1265 @@
+# Copyright (C) 2015 Google Inc., authors, and contributors %3Csee AUTHORS file%3E%0A# Licensed under http://www.apache.org/licenses/LICENSE-2.0 %3Csee LICENSE file%3E%0A# Created By: jernej@reciprocitylabs.com%0A# Maintained By: jernej@reciprocitylabs.com%0A%0Afrom lib import decorator, exception%0A%0A%0Aclass DecoratePublicMethods(type):%0A    # todo: this should be refactored to DecorateMethods and used with a factory%0A    %22%22%22%0A    Decorates all test methods with a decorator that makes a screenshot on%0A    any exception.%0A    %22%22%22%0A    def __new__(mcs, name, bases, dct):%0A        for attr_name, value in dct.items():%0A            if all(%5Bname in attr_name for name in %5B%22test_%22, %22_test%22%5D%5D) %5C%0A                    and hasattr(value, %22__call__%22):%0A                dct%5Battr_name%5D = decorator.take_screenshot_on_error(value)%0A%0A        return super(DecoratePublicMethods, mcs).__new__(mcs, name, bases, dct)%0A%0A%0Aclass RequireDocs(type):%0A    %22%22%22%0A    Requires from all methods to include docstrings.%0A    %22%22%22%0A    def __new__(mcs, name, bases, dct):%0A        for attr_name, value in dct.items():%0A            if hasattr(value, %22__call__%22) and not hasattr(value, %22__doc__%22):%0A                raise exception.DocstringsMissing(attr_name)%0A%0A        return super(RequireDocs, mcs).__new__(mcs, name, bases, dct)%0A

Add meta