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


Python Tns.run_tns_command方法代码示例

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


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

示例1: test_400_prepare_missing_or_missing_platform

# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import run_tns_command [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
开发者ID:NativeScript,项目名称:nativescript-cli-tests,代码行数:9,代码来源:prepare_android_tests.py

示例2: test_400_platform_list_wrong_path

# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import run_tns_command [as 别名]
    def test_400_platform_list_wrong_path(self):
        output = Tns.run_tns_command("platform list")
        assert "No project found at or above" in output
        assert "and neither was a --path specified." in output

        output = Tns.run_tns_command("platform list", attributes={"--path": "invalidPath"})
        assert "No project found at or above" in output
        assert "and neither was a --path specified." in output
开发者ID:NativeScript,项目名称:nativescript-cli-tests,代码行数:10,代码来源:platform_android_tests.py

示例3: test_002_usage_reporting_disable

# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import run_tns_command [as 别名]
    def test_002_usage_reporting_disable(self):
        output = Tns.run_tns_command("usage-reporting disable")
        assert disabled.format(usage_reporting, "now ") in output
        assert "GA_TRACKING_ID" in File.read(self.config)
        assert "UA-111455-44" in File.read(self.config)

        # Check there is no any message for tracking in Google Analytics
        output = Tns.run_tns_command("doctor", timeout=180, log_trace=True)
        assert "Will send the following information to Google Analytics" not in output

        output = Tns.run_tns_command("usage-reporting status")
        assert disabled.format(usage_reporting, "") in output
开发者ID:NativeScript,项目名称:nativescript-cli-tests,代码行数:14,代码来源:usage_reporting_tests.py

示例4: test_114_device_log_help

# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import run_tns_command [as 别名]
    def test_114_device_log_help(self):
        output = Tns.run_tns_command("device log --help")

        HelpTests.verify_help(output)
        assert "device log" in output
        assert "Options" in output
        assert "device" in output
开发者ID:NativeScript,项目名称:nativescript-cli-tests,代码行数:9,代码来源:help_tests.py

示例5: test_391_platform_list

# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import run_tns_command [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
开发者ID:NativeScript,项目名称:nativescript-cli-tests,代码行数:36,代码来源:platform_ios_tests.py

示例6: test_112_install_help

# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import run_tns_command [as 别名]
    def test_112_install_help(self):
        output = Tns.run_tns_command("install -h")

        HelpTests.verify_help(output)
        assert "install" in output
        assert "Arguments" in output
        assert "Options" in output
        assert "path" in output
开发者ID:NativeScript,项目名称:nativescript-cli-tests,代码行数:10,代码来源:help_tests.py

示例7: test_115_run_ios_help

# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import run_tns_command [as 别名]
    def test_115_run_ios_help(self):
        output = Tns.run_tns_command("run ios --help")

        HelpTests.verify_help(output)
        assert "syncAllFiles" in output
        assert "env.*" in output
        assert "bundle" in output
        assert "justlaunch" in output
        assert "sdk" in output
开发者ID:NativeScript,项目名称:nativescript-cli-tests,代码行数:11,代码来源:help_tests.py

示例8: test_116_run_android_help

# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import run_tns_command [as 别名]
    def test_116_run_android_help(self):
        output = Tns.run_tns_command("run android --help")

        HelpTests.verify_help(output)
        assert "syncAllFiles" in output
        assert "env.*" in output
        assert "bundle" in output
        assert "justlaunch" in output
        assert "key-store-path" in output
开发者ID:NativeScript,项目名称:nativescript-cli-tests,代码行数:11,代码来源:help_tests.py

示例9: test_001_help

# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import run_tns_command [as 别名]
    def test_001_help(self):
        output = Tns.run_tns_command("--help")

        assert "NativeScript" in output
        assert "General Commands" in output
        assert "Project Development Commands" in output
        assert "Publishing Commands" in output
        assert "Device Commands" in output
        assert "Global Options" in output
开发者ID:NativeScript,项目名称:nativescript-cli-tests,代码行数:11,代码来源:help_tests.py

示例10: test_400_build_with_no_platform

# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import run_tns_command [as 别名]
    def test_400_build_with_no_platform(self):
        output = Tns.run_tns_command("build")
        assert invalid_input.format("build") in output
        assert "# tns build" in output

        if CURRENT_OS == OSType.OSX:
            assert "$ tns build <Platform>" in output
        else:
            assert "$ tns build android" in output
开发者ID:NativeScript,项目名称:nativescript-cli-tests,代码行数:11,代码来源:build_android_tests.py

示例11: test_113_plugin_help

# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import run_tns_command [as 别名]
    def test_113_plugin_help(self):
        output = Tns.run_tns_command("plugin --help")

        HelpTests.verify_help(output)
        assert "plugin" in output
        assert "add" in output
        assert "remove" in output
        assert "update" in output
        assert "create" in output
        assert "Arguments" in output
开发者ID:NativeScript,项目名称:nativescript-cli-tests,代码行数:12,代码来源:help_tests.py

示例12: test_102_create_app_help

# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import run_tns_command [as 别名]
    def test_102_create_app_help(self):
        output = Tns.run_tns_command("create --help")

        assert "Template" in output
        assert "Synopsis" in output
        assert "create" in output
        assert "Options" in output
        assert "Arguments" in output
        assert "Angular based" in output
        assert "predefined template" in output
开发者ID:NativeScript,项目名称:nativescript-cli-tests,代码行数:12,代码来源:help_tests.py

示例13: test_001_usage_reporting_enable

# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import run_tns_command [as 别名]
    def test_001_usage_reporting_enable(self):
        output = Tns.run_tns_command("usage-reporting enable")
        assert enabled.format(usage_reporting, "now ") in output
        assert "GA_TRACKING_ID" in File.read(self.config)
        assert "UA-111455-44" in File.read(self.config)

        # Check there is message for tracking in Google Analytics
        output = Tns.run_tns_command("doctor", timeout=180, log_trace=True)
        assert "Will send the following information to Google Analytics" in output

        output = Tns.run_tns_command("usage-reporting status")
        assert enabled.format(usage_reporting, "") in output

        # https://github.com/NativeScript/nativescript-cli/issues/3595
        output = Tns.create_app(self.app_name,
                                attributes={'--template': os.path.join('data', 'apps', 'livesync-hello-world.tgz')},
                                log_trace=True,
                                force_clean=False, update_modules=True)
        assert "label: 'data/apps/livesync-hello-world.tgz'" not in output
        assert "label: 'localTemplate_tns-template-hello-world'" in output
开发者ID:NativeScript,项目名称:nativescript-cli-tests,代码行数:22,代码来源:usage_reporting_tests.py

示例14: test_105_update_help

# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import run_tns_command [as 别名]
    def test_105_update_help(self):
        output = Tns.run_tns_command("platform update --help")

        HelpTests.verify_help(output)
        assert "platform update" in output
        assert "Android selected runtime" in output
        assert "Arguments" in output

        if CURRENT_OS == OSType.OSX:
            assert "iOS latest runtime" in output
        else:
            assert "iOS latest runtime" not in output
开发者ID:NativeScript,项目名称:nativescript-cli-tests,代码行数:14,代码来源:help_tests.py

示例15: test_106_prepare_help

# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import run_tns_command [as 别名]
    def test_106_prepare_help(self):
        output = Tns.run_tns_command("prepare --help")

        HelpTests.verify_help(output)
        assert "prepare" in output
        assert "android" in output

        if CURRENT_OS == OSType.OSX:
            assert "ios" in output
            assert "Arguments" in output
        else:
            assert "ios" not in output
            assert "Arguments" not in output
开发者ID:NativeScript,项目名称:nativescript-cli-tests,代码行数:15,代码来源:help_tests.py


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