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


Python AndroidDistribution.locate_sdk_path方法代码示例

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


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

示例1: test_locate_sdk_path

# 需要导入模块: from pants.backend.android.distribution.android_distribution import AndroidDistribution [as 别名]
# 或者: from pants.backend.android.distribution.android_distribution.AndroidDistribution import locate_sdk_path [as 别名]
  def test_locate_sdk_path(self, path=None):
    # We can set good/bad paths alike. No checks until tools are called.

    @contextmanager
    def env(**kwargs):
      environment = dict(ANDROID_HOME=None, ANDROID_SDK_HOME=None, ANDROID_SDK=None)
      environment.update(**kwargs)
      with environment_as(**environment):
        yield

    with self.distribution() as sdk:
      with env(ANDROooooD_HOME=sdk):
        AndroidDistribution.locate_sdk_path(path)

    with self.distribution() as sdk:
      with env(ANDROID_HOME=sdk):
        AndroidDistribution.locate_sdk_path(path)
开发者ID:arloherrine,项目名称:pants,代码行数:19,代码来源:test_android_distribution.py

示例2: test_locate_alternative_variables

# 需要导入模块: from pants.backend.android.distribution.android_distribution import AndroidDistribution [as 别名]
# 或者: from pants.backend.android.distribution.android_distribution.AndroidDistribution import locate_sdk_path [as 别名]
 def test_locate_alternative_variables(self):
     # Test that alternative environmental variables are accepted.
     with distribution() as sdk:
         with self.env(ANDROID_SDK=sdk):
             dist = AndroidDistribution.locate_sdk_path()
             self.assertEquals(dist._sdk_path, sdk)
开发者ID:jduan,项目名称:pants,代码行数:8,代码来源:test_android_distribution.py

示例3: test_locate_sdk_path

# 需要导入模块: from pants.backend.android.distribution.android_distribution import AndroidDistribution [as 别名]
# 或者: from pants.backend.android.distribution.android_distribution.AndroidDistribution import locate_sdk_path [as 别名]
 def test_locate_sdk_path(self):
     with distribution() as sdk:
         with self.env(ANDROID_HOME=sdk):
             dist = AndroidDistribution.locate_sdk_path()
             self.assertEquals(dist._sdk_path, sdk)
开发者ID:jduan,项目名称:pants,代码行数:7,代码来源:test_android_distribution.py

示例4: test_locate_no_sdk_on_path

# 需要导入模块: from pants.backend.android.distribution.android_distribution import AndroidDistribution [as 别名]
# 或者: from pants.backend.android.distribution.android_distribution.AndroidDistribution import locate_sdk_path [as 别名]
 def test_locate_no_sdk_on_path(self):
     with distribution() as sdk:
         with self.env(ANDROooooD_HOME=sdk):
             with self.assertRaises(AndroidDistribution.DistributionError):
                 AndroidDistribution.locate_sdk_path()
开发者ID:jduan,项目名称:pants,代码行数:7,代码来源:test_android_distribution.py

示例5: test_locate_no_sdk_on_path

# 需要导入模块: from pants.backend.android.distribution.android_distribution import AndroidDistribution [as 别名]
# 或者: from pants.backend.android.distribution.android_distribution.AndroidDistribution import locate_sdk_path [as 别名]
 def test_locate_no_sdk_on_path(self):
   with self.assertRaises(AndroidDistribution.DistributionError):
     with self.distribution() as sdk:
       with self.env(ANDROooooD_HOME=sdk):
         dist = AndroidDistribution.locate_sdk_path()
         self.assertEquals(dist._sdk_path, None)
开发者ID:dominichamon,项目名称:pants,代码行数:8,代码来源:test_android_distribution.py


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