本文整理汇总了Python中core.tns.tns.Tns.platform_remove方法的典型用法代码示例。如果您正苦于以下问题:Python Tns.platform_remove方法的具体用法?Python Tns.platform_remove怎么用?Python Tns.platform_remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类core.tns.tns.Tns
的用法示例。
在下文中一共展示了Tns.platform_remove方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_400_prepare_missing_or_missing_platform
# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import platform_remove [as 别名]
def test_400_prepare_missing_or_missing_platform(self):
Tns.platform_remove(platform=Platform.ANDROID, attributes={"--path": self.app_name}, assert_success=False)
output = Tns.run_tns_command("prepare", attributes={"--path": self.app_name})
assert "No platform specified." in output
output = Tns.run_tns_command("prepare windows", attributes={"--path": self.app_name})
assert "Invalid platform windows. Valid platforms are ios or android." in output
示例2: test_330_prepare_android_next
# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import platform_remove [as 别名]
def test_330_prepare_android_next(self):
Tns.platform_remove(platform=Platform.ANDROID, attributes={"--path": self.app_name}, assert_success=False)
Tns.platform_add_android(attributes={"--path": self.app_name}, version="next")
Folder.cleanup(os.path.join(self.app_name, "node_modules"))
Folder.cleanup(os.path.join(self.app_name, "platforms"))
android_version = Npm.get_version("[email protected]")
File.replace(file_path=os.path.join(self.app_name, "package.json"), str1=android_version, str2="next")
output = Tns.prepare_android(attributes={"--path": self.app_name})
TnsAsserts.prepared(self.app_name, platform=Platform.ANDROID, output=output, prepare=Prepare.FIRST_TIME)
示例3: test_210_platform_not_need_remove_after_bitcode_error
# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import platform_remove [as 别名]
def test_210_platform_not_need_remove_after_bitcode_error(self):
# https://github.com/NativeScript/nativescript-cli/issues/3741
Tns.platform_remove(platform=Platform.ANDROID, attributes={"--path": self.app_name}, assert_success=False)
Folder.navigate_to(self.app_name + "/app")
path = os.path.join(self.app_name + "/app")
run("touch a")
run("ln -s a b")
run("rm a")
Folder.navigate_to(folder=TEST_RUN_HOME, relative_from_current_folder=False)
output = Tns.prepare_android(attributes={"--path": self.app_name})
assert "Project successfully prepared" in output
示例4: test_130_platform_remove_and_platform_add_android_custom_version
# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import platform_remove [as 别名]
def test_130_platform_remove_and_platform_add_android_custom_version(self):
"""Verify platform add supports custom versions"""
# Add custom version number
Tns.platform_add_android(version="5.0.0", attributes={"--path": self.app_name})
TnsAsserts.package_json_contains(self.app_name, ["\"version\": \"5.0.0\""])
# Add remove
Tns.platform_remove(platform=Platform.ANDROID, attributes={"--path": self.app_name})
# Add custom version with tag
Tns.platform_add_android(version="rc", attributes={"--path": self.app_name})
示例5: test_430_platform_remove_missing_invalid_or_empty_platform
# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import platform_remove [as 别名]
def test_430_platform_remove_missing_invalid_or_empty_platform(self):
output = Tns.platform_remove(platform=Platform.ANDROID, attributes={"--path": self.app_name},
assert_success=False)
assert "The platform android is not added to this project"
assert "Usage" in output
output = Tns.platform_remove(platform="invalidPlatform", attributes={"--path": self.app_name},
assert_success=False)
assert "Invalid platform invalidplatform. Valid platforms are ios or android." in output
assert "Usage" in output
output = Tns.platform_remove(attributes={"--path": self.app_name}, assert_success=False)
assert no_platform in output
assert "Usage" in output
示例6: test_390_platform_list
# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import platform_remove [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)
示例7: test_201_prepare_ios_platform_not_added
# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import platform_remove [as 别名]
def test_201_prepare_ios_platform_not_added(self):
Tns.platform_remove(platform=Platform.IOS, attributes={"--path": self.app_name}, assert_success=False)
output = Tns.prepare_ios(attributes={"--path": self.app_name})
TnsAsserts.prepared(self.app_name, platform=Platform.IOS, output=output, prepare=Prepare.FIRST_TIME)
示例8: test_201_platform_remove_ios
# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import platform_remove [as 别名]
def test_201_platform_remove_ios(self):
Tns.platform_add_ios(attributes={"--path": self.app_name, "--frameworkPath": IOS_PACKAGE})
Tns.platform_remove(platform="ios", attributes={"--path": self.app_name})
assert Folder.is_empty(self.app_name + '/platforms')
output = File.read(self.app_name + os.sep + "package.json")
assert "tns-ios" not in output
示例9: setUp
# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import platform_remove [as 别名]
def setUp(self):
BaseClass.setUp(self)
Tns.platform_remove(platform=Platform.IOS, attributes={"--path": self.app_name}, assert_success=False)
示例10: test_302_build_project_with_space_debug_with_plugin
# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import platform_remove [as 别名]
def test_302_build_project_with_space_debug_with_plugin(self):
Tns.platform_remove(platform=Platform.ANDROID, attributes={"--path": "\"" + self.app_name_space + "\""}, assert_success=False)
Npm.install(package="nativescript-mapbox", option="--save", folder="\"" + self.app_name_space + "\"")
output = Tns.build_android(attributes={"--path": "\"" + self.app_name_space + "\""})
assert "Project successfully built" in output
示例11: test_201_prepare_xml_error
# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import platform_remove [as 别名]
def test_201_prepare_xml_error(self):
Tns.platform_remove(platform=Platform.ANDROID, attributes={"--path": self.app_name}, assert_success=False)
ReplaceHelper.replace(self.app_name, ReplaceHelper.CHANGE_XML_INVALID_SYNTAX)
output = Tns.prepare_android(attributes={"--path": self.app_name})
assert "main-page.xml has syntax errors." in output
assert "unclosed xml attribute" in output
示例12: test_200_prepare_android_platform_not_added
# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import platform_remove [as 别名]
def test_200_prepare_android_platform_not_added(self):
Tns.platform_remove(platform=Platform.ANDROID, attributes={"--path": self.app_name}, assert_success=False)
output = Tns.prepare_android(attributes={"--path": self.app_name})
TnsAsserts.prepared(self.app_name, platform=Platform.ANDROID, output=output, prepare=Prepare.FIRST_TIME)