本文整理汇总了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})
示例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})
示例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)
示例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")
示例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})
示例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})
示例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")
示例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()
示例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")
示例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'))
示例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)
示例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})
示例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"}')
示例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})
示例15: tearDownClass
def tearDownClass(cls):
BaseClass.tearDownClass()
Emulator.stop()