當前位置: 首頁>>代碼示例>>Python>>正文


Python BaseClass.BaseClass類代碼示例

本文整理匯總了Python中core.base_class.BaseClass.BaseClass的典型用法代碼示例。如果您正苦於以下問題:Python BaseClass類的具體用法?Python BaseClass怎麽用?Python BaseClass使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了BaseClass類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: setUpClass

    def setUpClass(cls):
        BaseClass.setUpClass(cls.__name__)
        Simulator.stop()
        cls.SIMULATOR_ID = Simulator.ensure_available(simulator_name=SIMULATOR_NAME)

        Tns.create_app(cls.app_name, update_modules=True)
        Tns.install_npm(package=WEBPACK_PACKAGE, option='--save-dev', folder=cls.app_name)
        Tns.platform_add_ios(attributes={'--path': cls.app_name, '--frameworkPath': IOS_PACKAGE})
開發者ID:NativeScript,項目名稱:nativescript-cli-tests,代碼行數:8,代碼來源:hello_world_js_hmr_ios.py

示例2: setUpClass

    def setUpClass(cls):
        BaseClass.setUpClass(cls.__name__)
        Emulator.stop()
        Emulator.ensure_available()

        Tns.create_app(cls.app_name, update_modules=True)
        Tns.install_npm(package=WEBPACK_PACKAGE, option='--save-dev', folder=cls.app_name)
        Tns.platform_add_android(attributes={"--path": cls.app_name, "--frameworkPath": ANDROID_PACKAGE})
開發者ID:NativeScript,項目名稱:nativescript-cli-tests,代碼行數:8,代碼來源:hello_world_js_hmr_android.py

示例3: setUp

    def setUp(self):
        BaseClass.setUp(self)
        Tns.kill()

        # Replace app folder between tests.
        app_folder = os.path.join(self.app_name, 'app')
        Folder.cleanup(app_folder)
        Folder.copy(src=self.TEMP_FOLDER, dst=app_folder)
開發者ID:NativeScript,項目名稱:nativescript-cli-tests,代碼行數:8,代碼來源:run_ios_device_tests.py

示例4: setUpClass

 def setUpClass(cls):
     BaseClass.setUpClass(cls.__name__)
     if CURRENT_OS != OSType.OSX:
         raise NameError("Can not run iOS tests on non OSX OS.")
     else:
         Simulator.stop()
     Tns.create_app(cls.app_name)
     Tns.platform_add_ios(attributes={"--path": cls.app_name, "--frameworkPath": IOS_PACKAGE})
     Folder.copy(TEST_RUN_HOME + "/" + cls.app_name, TEST_RUN_HOME + "/data/TestApp")
開發者ID:NativeScript,項目名稱:nativescript-cli-tests,代碼行數:9,代碼來源:prepare_ios_tests.py

示例5: setUpClass

 def setUpClass(cls):
     BaseClass.setUpClass(cls.__name__)
     Emulator.stop()
     Device.ensure_available(platform=Platform.ANDROID)
     Device.uninstall_app(app_prefix="org.nativescript.", platform=Platform.ANDROID)
     Tns.create_app(cls.app_name,
                    attributes={'--template': os.path.join('data', 'apps', 'livesync-hello-world.tgz')},
                    update_modules=True)
     Tns.platform_add_android(attributes={'--path': cls.app_name, '--frameworkPath': ANDROID_PACKAGE})
開發者ID:NativeScript,項目名稱:nativescript-cli-tests,代碼行數:9,代碼來源:run_android_device_tests.py

示例6: setUpClass

    def setUpClass(cls):
        BaseClass.setUpClass(cls.__name__)
        Emulator.stop()
        Device.uninstall_app(app_prefix="org.nativescript.", platform=Platform.ANDROID)
        Emulator.ensure_available()
        Folder.cleanup(cls.app_name)

        # Create default NG app (to get right dependencies from package.json)
        Tns.create_app_ng(cls.app_name)
        Tns.platform_add_android(attributes={'--path': cls.app_name, '--frameworkPath': ANDROID_PACKAGE}) 
開發者ID:NativeScript,項目名稱:nativescript-cli-tests,代碼行數:10,代碼來源:run_android_ng_tests.py

示例7: tearDown

    def tearDown(self):
        # Verify application state at the end of the test is correct
        if File.exists(self.app_name):
            data = TnsAsserts.get_package_json(self.app_name)
            assert "tns-android" in data["nativescript"], "'tns-android' not found under `nativescript` in package.json"
            assert "tns-android" not in data["dependencies"], "'tns-android' found under `dependencies` in package.json"

        BaseClass.tearDown(self)
        Folder.cleanup(self.platforms_android + '/build/outputs')
        Folder.cleanup("with space")
開發者ID:NativeScript,項目名稱:nativescript-cli-tests,代碼行數:10,代碼來源:build_android_tests.py

示例8: setUp

 def setUp(self):
     BaseClass.setUp(self)
     Folder.cleanup(self.source_app)
     if CURRENT_OS != OSType.WINDOWS:
         Folder.copy(self.temp_app, self.source_app)
     else:
         Tns.create_app(self.app_name,
                        attributes={'--template': os.path.join('data', 'apps', 'livesync-hello-world.tgz')},
                        update_modules=True)
         Tns.platform_add_android(attributes={'--path': self.app_name, '--frameworkPath': ANDROID_PACKAGE})
         Emulator.ensure_available()
開發者ID:NativeScript,項目名稱:nativescript-cli-tests,代碼行數:11,代碼來源:run_android_tests.py

示例9: setUpClass

 def setUpClass(cls):
     BaseClass.setUpClass(cls.__name__)
     Emulator.stop()
     Simulator.stop()
     cls.SIMULATOR_ID = Simulator.ensure_available(simulator_name=SIMULATOR_NAME)
     Folder.cleanup(cls.app_name)
     Tns.create_app(cls.app_name,
                    attributes={'--template': os.path.join('data', 'apps', 'livesync-hello-world.tgz')},
                    update_modules=True)
     Tns.platform_add_ios(attributes={'--path': cls.app_name, '--frameworkPath': IOS_PACKAGE})
     Folder.cleanup(TEST_RUN_HOME + "/data/TestApp")
     Folder.copy(TEST_RUN_HOME + "/" + cls.app_name, TEST_RUN_HOME + "/data/TestApp")
開發者ID:NativeScript,項目名稱:nativescript-cli-tests,代碼行數:12,代碼來源:run_ios_tests.py

示例10: setUpClass

    def setUpClass(cls):
        BaseClass.setUpClass(cls.__name__)
        Emulator.stop()
        Emulator.ensure_available()

        Tns.create_app(BaseClass.app_name)
        Tns.platform_add_android(attributes={"--path": BaseClass.app_name, "--frameworkPath": ANDROID_PACKAGE})
        Tns.update_webpack(BaseClass.app_name)
        Folder.copy(os.path.join(TEST_RUN_HOME, BaseClass.app_name), os.path.join(TEST_RUN_HOME, "data", "TestApp"))

        #Download bundletool
        url = 'https://github.com/google/bundletool/releases/download/0.8.0/bundletool-all-0.8.0.jar'
        urllib.urlretrieve(url, os.path.join(SUT_FOLDER, 'bundletool.jar'))
開發者ID:NativeScript,項目名稱:nativescript-cli-tests,代碼行數:13,代碼來源:android_app_bundle_tests.py

示例11: setUpClass

 def setUpClass(cls):
     BaseClass.setUpClass(cls.__name__)
     Tns.kill()
     Emulator.stop()
     Emulator.ensure_available()
     Device.uninstall_app(app_prefix="org.nativescript.", platform=Platform.ANDROID)
     if CURRENT_OS != OSType.WINDOWS:
         Tns.create_app(cls.app_name,
                        attributes={'--template': os.path.join('data', 'apps', 'livesync-hello-world.tgz')},
                        update_modules=True)
         Tns.platform_add_android(attributes={'--path': cls.app_name, '--frameworkPath': ANDROID_PACKAGE})
         Folder.cleanup(cls.temp_app)
         Folder.copy(cls.source_app, cls.temp_app)
開發者ID:NativeScript,項目名稱:nativescript-cli-tests,代碼行數:13,代碼來源:run_android_tests.py

示例12: setUpClass

    def setUpClass(cls):
        BaseClass.setUpClass(cls.__name__)
        Emulator.stop()
        Simulator.stop()
        Device.ensure_available(platform=Platform.IOS)
        Device.uninstall_app(app_prefix='org.nativescript.', platform=Platform.IOS)

        Folder.cleanup(cls.app_name)
        Tns.create_app(cls.app_name,
                       attributes={'--template': os.path.join('data', 'apps', 'livesync-hello-world.tgz')},
                       update_modules=True)
        Folder.copy(src=os.path.join(cls.app_name, 'app'), dst=cls.TEMP_FOLDER)
        Tns.platform_add_ios(attributes={'--path': cls.app_name, '--frameworkPath': IOS_PACKAGE})
開發者ID:NativeScript,項目名稱:nativescript-cli-tests,代碼行數:13,代碼來源:run_ios_device_tests.py

示例13: setUpClass

    def setUpClass(cls):
        BaseClass.setUpClass(cls.__name__)

        Folder.cleanup(cls.app_no_platform)

        File.remove(cls.debug_apk)
        File.remove(cls.release_apk)
        Folder.cleanup('temp')

        Tns.create_app(cls.app_name)
        Tns.platform_add_android(attributes={"--path": cls.app_name, "--frameworkPath": ANDROID_PACKAGE})

        # Add release and debug configs
        debug = os.path.join(cls.app_name, 'app', 'config.debug.json')
        release = os.path.join(cls.app_name, 'app', 'config.release.json')
        File.write(file_path=debug, text='{"config":"debug"}')
        File.write(file_path=release, text='{"config":"release"}')
開發者ID:NativeScript,項目名稱:nativescript-cli-tests,代碼行數:17,代碼來源:build_android_tests.py

示例14: setUpClass

 def setUpClass(cls):
     BaseClass.setUpClass(cls.__name__)
     Process.kill('Safari')
     Process.kill('NativeScript Inspector')
     Emulator.stop()
     Simulator.stop()
     cls.SIMULATOR_ID = Simulator.ensure_available(simulator_name=SIMULATOR_NAME)
     Folder.cleanup(cls.INSPECTOR_GLOBAL_PATH)
     Tns.create_app(cls.app_name,
                    attributes={'--template': os.path.join('data', 'apps', 'livesync-hello-world.tgz')},
                    update_modules=True)
     Tns.platform_add_ios(attributes={'--path': cls.app_name, '--frameworkPath': IOS_PACKAGE})
     if USE_YARN == "True":
         Npm.install(package=IOS_INSPECTOR_PACKAGE, option='--dev', folder=cls.app_name)
     else:
         Npm.install(package=IOS_INSPECTOR_PACKAGE, option='--save-dev', folder=cls.app_name)
     Tns.build_ios(attributes={"--path": cls.app_name})
開發者ID:NativeScript,項目名稱:nativescript-cli-tests,代碼行數:17,代碼來源:debug_ios_inspector_tests.py

示例15: tearDownClass

 def tearDownClass(cls):
     BaseClass.tearDownClass()
     Emulator.stop()
開發者ID:NativeScript,項目名稱:nativescript-cli-tests,代碼行數:3,代碼來源:run_android_ng_tests.py


注:本文中的core.base_class.BaseClass.BaseClass類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。