本文整理汇总了Python中core.tns.tns.Tns.platform_list方法的典型用法代码示例。如果您正苦于以下问题:Python Tns.platform_list方法的具体用法?Python Tns.platform_list怎么用?Python Tns.platform_list使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类core.tns.tns.Tns
的用法示例。
在下文中一共展示了Tns.platform_list方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_391_platform_list
# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import platform_list [as 别名]
def test_391_platform_list(self):
"""Platform list command should list installed platforms and if app is prepared for those platforms"""
Folder.cleanup(self.app_name)
Tns.create_app(self.app_name, update_modules=False)
# `tns platform list` on brand new project
output = Tns.platform_list(attributes={"--path": self.app_name})
TnsAsserts.platform_list_status(output=output, prepared=Platform.NONE, added=Platform.NONE)
# `tns platform list` when iOS is added
Tns.platform_add_ios(attributes={"--path": self.app_name, "--frameworkPath": IOS_PACKAGE})
output = Tns.platform_list(attributes={"--path": self.app_name})
TnsAsserts.platform_list_status(output=output, prepared=Platform.NONE, added=Platform.IOS)
# `tns platform list` when iOS is prepared
Tns.prepare_ios(attributes={"--path": self.app_name})
output = Tns.platform_list(attributes={"--path": self.app_name})
TnsAsserts.platform_list_status(output=output, prepared=Platform.IOS, added=Platform.IOS)
# `tns platform list` when android is added (iOS already prepared)
Tns.platform_add_android(attributes={"--path": self.app_name, "--frameworkPath": ANDROID_PACKAGE})
output = Tns.platform_list(attributes={"--path": self.app_name})
TnsAsserts.platform_list_status(output=output, prepared=Platform.IOS, added=Platform.BOTH)
# `tns platform list` when android is prepared (iOS already prepared)
Tns.prepare_android(attributes={"--path": self.app_name})
output = Tns.platform_list(attributes={"--path": self.app_name})
TnsAsserts.platform_list_status(output=output, prepared=Platform.BOTH, added=Platform.BOTH)
# Verify build both platforms is not allowed
# Test for https://github.com/NativeScript/nativescript-cli/pull/3425
output = Tns.run_tns_command(command="build", attributes={"--path": self.app_name})
assert "The input is not valid sub-command for 'build' command" in output
assert "<Platform> is the target mobile platform for which you want to build your project" in output
示例2: test_390_platform_list
# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import platform_list [as 别名]
def test_390_platform_list(self):
"""Platform list command should list installed platforms and if app is prepared for those platforms"""
# issue with v2 of templates - workaround with remove ios platform
Tns.platform_remove(platform=Platform.IOS, attributes={"--path": self.app_name}, assert_success=False)
# `tns platform list` on brand new project
output = Tns.platform_list(attributes={"--path": self.app_name})
TnsAsserts.platform_list_status(output=output, prepared=Platform.NONE, added=Platform.NONE)
# `tns platform list` when android is added
Tns.platform_add_android(attributes={"--path": self.app_name, "--frameworkPath": ANDROID_PACKAGE})
output = Tns.platform_list(attributes={"--path": self.app_name})
TnsAsserts.platform_list_status(output=output, prepared=Platform.NONE, added=Platform.ANDROID)
# `tns platform list` when android is prepared
Tns.prepare_android(attributes={"--path": self.app_name})
output = Tns.platform_list(attributes={"--path": self.app_name})
TnsAsserts.platform_list_status(output=output, prepared=Platform.ANDROID, added=Platform.ANDROID)