@@ -0,0 +1,1607 @@
+'''%0ACommon objects for testing%0A==========================%0A%0A* :class:%60PlatformTest%60 - used as a decorator, allows running a test function%0A  only on a specific platform (see %60plyer.utils.platform%60).%0A* :func:%60platform_import%60 - manual import of a platform specific class instead%0A  of using %60plyer.facades.*%60 proxies.%0A'''%0A%0Aimport traceback%0Afrom plyer.utils import platform as plyer_platform%0A%0A%0Aclass PlatformTest(object):%0A    # pylint: disable=too-few-public-methods%0A    '''%0A    Class for the @PlatformTest decorator to prevent running tests%0A    calling platform dependent API on different platforms.%0A    '''%0A%0A    def __init__(self, platform):%0A        self.platform = platform%0A%0A    def __call__(self, func):%0A        platform = self.platform%0A%0A        if platform != plyer_platform:%0A            print(%22Skipping test '%7B%7D' - not on '%7B%7D'%22.format(%0A                func.__name__, platform%0A            ))%0A            func = self.eat%0A        return func%0A%0A    @staticmethod%0A    def eat(*args, **kwargs):%0A        # pylint: disable=unused-argument%0A        '''%0A        Simply eat all positional and keyword arguments%0A        and return None as an empty function.%0A        '''%0A%0A%0Adef platform_import(platform, module_name, whereis_exe=None):%0A    '''%0A    Import platform API directly instead of through Proxy.%0A    '''%0A%0A    try:%0A        module = 'plyer.platforms.%7B%7D.%7B%7D'.format(%0A            platform, module_name%0A        )%0A        mod = __import__(module, fromlist='.')%0A%0A    except ImportError as exc:%0A        print(vars(exc))%0A        traceback.print_exc()%0A%0A    if whereis_exe:%0A        mod.whereis_exe = whereis_exe%0A    return mod%0A

Add common module for testing