本文整理汇总了Python中core.base_class.BaseClass.BaseClass.setUpClass方法的典型用法代码示例。如果您正苦于以下问题:Python BaseClass.setUpClass方法的具体用法?Python BaseClass.setUpClass怎么用?Python BaseClass.setUpClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类core.base_class.BaseClass.BaseClass
的用法示例。
在下文中一共展示了BaseClass.setUpClass方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUpClass
# 需要导入模块: from core.base_class.BaseClass import BaseClass [as 别名]
# 或者: from core.base_class.BaseClass.BaseClass import setUpClass [as 别名]
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})
示例2: setUpClass
# 需要导入模块: from core.base_class.BaseClass import BaseClass [as 别名]
# 或者: from core.base_class.BaseClass.BaseClass import setUpClass [as 别名]
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})
示例3: setUpClass
# 需要导入模块: from core.base_class.BaseClass import BaseClass [as 别名]
# 或者: from core.base_class.BaseClass.BaseClass import setUpClass [as 别名]
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})
示例4: setUpClass
# 需要导入模块: from core.base_class.BaseClass import BaseClass [as 别名]
# 或者: from core.base_class.BaseClass.BaseClass import setUpClass [as 别名]
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")
示例5: setUpClass
# 需要导入模块: from core.base_class.BaseClass import BaseClass [as 别名]
# 或者: from core.base_class.BaseClass.BaseClass import setUpClass [as 别名]
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})
示例6: setUpClass
# 需要导入模块: from core.base_class.BaseClass import BaseClass [as 别名]
# 或者: from core.base_class.BaseClass.BaseClass import setUpClass [as 别名]
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")
示例7: setUpClass
# 需要导入模块: from core.base_class.BaseClass import BaseClass [as 别名]
# 或者: from core.base_class.BaseClass.BaseClass import setUpClass [as 别名]
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})
示例8: setUpClass
# 需要导入模块: from core.base_class.BaseClass import BaseClass [as 别名]
# 或者: from core.base_class.BaseClass.BaseClass import setUpClass [as 别名]
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)
示例9: setUpClass
# 需要导入模块: from core.base_class.BaseClass import BaseClass [as 别名]
# 或者: from core.base_class.BaseClass.BaseClass import setUpClass [as 别名]
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'))
示例10: setUpClass
# 需要导入模块: from core.base_class.BaseClass import BaseClass [as 别名]
# 或者: from core.base_class.BaseClass.BaseClass import setUpClass [as 别名]
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"}')
示例11: setUpClass
# 需要导入模块: from core.base_class.BaseClass import BaseClass [as 别名]
# 或者: from core.base_class.BaseClass.BaseClass import setUpClass [as 别名]
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})
示例12: setUpClass
# 需要导入模块: from core.base_class.BaseClass import BaseClass [as 别名]
# 或者: from core.base_class.BaseClass.BaseClass import setUpClass [as 别名]
def setUpClass(cls):
BaseClass.setUpClass(cls.__name__)
示例13: setUpClass
# 需要导入模块: from core.base_class.BaseClass import BaseClass [as 别名]
# 或者: from core.base_class.BaseClass.BaseClass import setUpClass [as 别名]
def setUpClass(cls):
BaseClass.setUpClass(cls.__name__)
Tns.create_app(cls.app_name, update_modules=False)
Tns.platform_add_android(attributes={"--path": cls.app_name, "--frameworkPath": ANDROID_PACKAGE})
Folder.copy(TEST_RUN_HOME + "/" + cls.app_name, TEST_RUN_HOME + "/data/TestApp")
示例14: setUpClass
# 需要导入模块: from core.base_class.BaseClass import BaseClass [as 别名]
# 或者: from core.base_class.BaseClass.BaseClass import setUpClass [as 别名]
def setUpClass(cls):
BaseClass.setUpClass(cls.__name__)
if CURRENT_OS != OSType.OSX:
raise NameError("Can not run iOS tests on non OSX OS.")
Tns.create_app(cls.app_name)
示例15: setUpClass
# 需要导入模块: from core.base_class.BaseClass import BaseClass [as 别名]
# 或者: from core.base_class.BaseClass.BaseClass import setUpClass [as 别名]
def setUpClass(cls):
BaseClass.setUpClass(cls.__name__)
Tns.create_app(cls.app_name, update_modules=False)