当前位置: 首页>>代码示例>>Python>>正文


Python support.python_is_optimized方法代码示例

本文整理汇总了Python中test.support.python_is_optimized方法的典型用法代码示例。如果您正苦于以下问题:Python support.python_is_optimized方法的具体用法?Python support.python_is_optimized怎么用?Python support.python_is_optimized使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在test.support的用法示例。


在下文中一共展示了support.python_is_optimized方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_python_is_optimized

# 需要导入模块: from test import support [as 别名]
# 或者: from test.support import python_is_optimized [as 别名]
def test_python_is_optimized(self):
        self.assertIsInstance(support.python_is_optimized(), bool) 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:4,代码来源:test_test_support.py

示例2: __init__

# 需要导入模块: from test import support [as 别名]
# 或者: from test.support import python_is_optimized [as 别名]
def __init__(self):
        import os.path
        from test import test_timeout

        self.valid = False
        expected = None
        for item in _expectations:
            if sys.platform.startswith(item[0]):
                expected = item[1]
                break
        if expected is not None:
            self.expected = set(expected.split())

            # These are broken tests, for now skipped on every platform.
            # XXX Fix these!
            self.expected.add('test_nis')

            # expected to be skipped on every platform, even Linux
            if not os.path.supports_unicode_filenames:
                self.expected.add('test_pep277')

            # doctest, profile and cProfile tests fail when the codec for the
            # fs encoding isn't built in because PyUnicode_Decode() adds two
            # calls into Python.
            encs = ("utf-8", "latin-1", "ascii", "mbcs", "utf-16", "utf-32")
            if sys.getfilesystemencoding().lower() not in encs:
                self.expected.add('test_profile')
                self.expected.add('test_cProfile')
                self.expected.add('test_doctest')

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

            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", "test_msilib"}
                self.expected |= WIN_ONLY

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

            if support.python_is_optimized():
                self.expected.add("test_gdb")

            self.valid = True 
开发者ID:war-and-code,项目名称:jawfish,代码行数:50,代码来源:regrtest.py


注:本文中的test.support.python_is_optimized方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。