def __init__(self):
        import os.path
        from test import test_timeout

        self.valid = False
        if _platform in _expectations:
            s = _expectations[_platform]
            self.expected = set(s.split())

            # expected to be skipped on every platform, even Linux
            self.expected.add('test_linuxaudiodev')

            if not os.path.supports_unicode_filenames:
                self.expected.add('test_pep277')

            try:
                from test import test_socket_ssl
            except __HOLE__:
                pass
            else:
                if test_socket_ssl.skip_expected:
                    self.expected.add('test_socket_ssl')

            if test_timeout.skip_expected:
                self.expected.add('test_timeout')

            if sys.maxint == 9223372036854775807L:
                self.expected.add('test_imageop')

            if not sys.platform in ("mac", "darwin"):
                MAC_ONLY = ["test_macos", "test_macostools", "test_aepack",
                            "test_plistlib", "test_scriptpackages",
                            "test_applesingle"]
                for skip in MAC_ONLY:
                    self.expected.add(skip)
            elif len(u'\0'.encode('unicode-internal')) == 4:
                self.expected.add("test_macostools")


            if sys.platform != "win32":
                # test_sqlite is only reliable on Windows where the library
                # is distributed with Python
                WIN_ONLY = ["test_unicode_file", "test_winreg",
                            "test_winsound", "test_startfile",
                            "test_sqlite"]
                for skip in WIN_ONLY:
                    self.expected.add(skip)

            if sys.platform != 'irix':
                IRIX_ONLY = ["test_imageop", "test_al", "test_cd", "test_cl",
                             "test_gl", "test_imgfile"]
                for skip in IRIX_ONLY:
                    self.expected.add(skip)

            if sys.platform != 'sunos5':
                self.expected.add('test_sunaudiodev')
                self.expected.add('test_nis')

            if not sys.py3kwarning:
                self.expected.add('test_py3kwarn')

            if test_support.is_jython:
                if os._name != 'posix':
                    self.expected.update([
                            'test_grp', 'test_mhlib', 'test_posix', 'test_pwd',
                            'test_signal'])
                if os._name != 'nt':
                    self.expected.add('test_nt_paths_jy')

            self.valid = True
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/test/regrtest.py/_ExpectedSkips.__init__