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


Python Platform.compatible方法代码示例

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


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

示例1: test_unknown

# 需要导入模块: from pex.platforms import Platform [as 别名]
# 或者: from pex.platforms.Platform import compatible [as 别名]
 def test_unknown(self):
     with pytest.raises(Platform.UnknownPlatformError):
         Platform.compatible("macosx-10.0-morfgorf", "macosx-10.1-morfgorf")
     with pytest.raises(Platform.UnknownPlatformError):
         Platform.compatible("macosx-10.0-x86_64", "macosx-10.1-morfgorf")
     with pytest.raises(Platform.UnknownPlatformError):
         Platform.compatible("macosx-10.0-morfgorf", "macosx-10.1-x86_64")
开发者ID:Houzz,项目名称:pex,代码行数:9,代码来源:test_platform.py

示例2: test_versioning

# 需要导入模块: from pex.platforms import Platform [as 别名]
# 或者: from pex.platforms.Platform import compatible [as 别名]
    def test_versioning(self):
        # Major versions incompatible
        assert not Platform.compatible("macosx-9.1-x86_64", "macosx-10.0-x86_64")
        assert not Platform.compatible("macosx-10.0-x86_64", "macosx-9.1-x86_64")

        # Platforms equal
        assert Platform.compatible("macosx-10.0-x86_64", "macosx-10.0-x86_64")

        # Minor versions less than
        assert Platform.compatible("macosx-10.0-x86_64", "macosx-10.1-x86_64")
        assert not Platform.compatible("macosx-10.1-x86_64", "macosx-10.0-x86_64")
        assert Platform.compatible("macosx-10.9-x86_64", "macosx-10.10-x86_64")
        assert not Platform.compatible("macosx-10.10-x86_64", "macosx-10.9-x86_64")
开发者ID:Houzz,项目名称:pex,代码行数:15,代码来源:test_platform.py

示例3: test_platform_subsets

# 需要导入模块: from pex.platforms import Platform [as 别名]
# 或者: from pex.platforms.Platform import compatible [as 别名]
    def test_platform_subsets(self):
        # Pure platform subset
        assert Platform.compatible("macosx-10.0-i386", "macosx-10.0-intel")

        # Version and platform subset
        assert Platform.compatible("macosx-10.0-i386", "macosx-10.1-intel")
        assert Platform.compatible("macosx-10.0-x86_64", "macosx-10.1-intel")

        # Intersecting sets of platform but not pure subset
        assert Platform.compatible("macosx-10.0-fat", "macosx-10.1-intel")

        # Non-intersecting sets of platform
        assert not Platform.compatible("macosx-10.0-ppc", "macosx-10.1-intel")

        # Test our common case
        assert Platform.compatible("macosx-10.4-x86_64", "macosx-10.7-intel")
开发者ID:Houzz,项目名称:pex,代码行数:18,代码来源:test_platform.py

示例4: test_pure_python

# 需要导入模块: from pex.platforms import Platform [as 别名]
# 或者: from pex.platforms.Platform import compatible [as 别名]
 def test_pure_python(self):
     assert Platform.compatible(None, None)
     assert Platform.compatible(None, "i386")
     assert Platform.compatible(None, "universal")
开发者ID:Houzz,项目名称:pex,代码行数:6,代码来源:test_platform.py

示例5: test_cross_platform

# 需要导入模块: from pex.platforms import Platform [as 别名]
# 或者: from pex.platforms.Platform import compatible [as 别名]
    def test_cross_platform(self):
        assert not Platform.compatible("linux-x86_64", "macosx-10.0-x86_64")

        # TODO(wickman): Should we do extended platform support beyond OS X?
        assert not Platform.compatible("linux-i386", "linux-x86_64")
开发者ID:Houzz,项目名称:pex,代码行数:7,代码来源:test_platform.py


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