本文整理汇总了Python中bzt.modules.grinder.GrinderExecutor.resource_files方法的典型用法代码示例。如果您正苦于以下问题:Python GrinderExecutor.resource_files方法的具体用法?Python GrinderExecutor.resource_files怎么用?Python GrinderExecutor.resource_files使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类bzt.modules.grinder.GrinderExecutor
的用法示例。
在下文中一共展示了GrinderExecutor.resource_files方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_resource_files_collection_noscript
# 需要导入模块: from bzt.modules.grinder import GrinderExecutor [as 别名]
# 或者: from bzt.modules.grinder.GrinderExecutor import resource_files [as 别名]
def test_resource_files_collection_noscript(self):
obj = GrinderExecutor()
obj.engine = EngineEmul()
obj.execution.merge({"scenario": {"properties-file": "tests/grinder/grinder.properties"}})
res_files = obj.resource_files()
artifacts = os.listdir(obj.engine.artifacts_dir)
self.assertEqual(len(res_files), 2)
self.assertEqual(len(artifacts), 2)
示例2: test_resource_files_collection_remote
# 需要导入模块: from bzt.modules.grinder import GrinderExecutor [as 别名]
# 或者: from bzt.modules.grinder.GrinderExecutor import resource_files [as 别名]
def test_resource_files_collection_remote(self):
obj = GrinderExecutor()
obj.engine = EngineEmul()
obj.execution.merge({"scenario": {"script": __dir__() + "/../grinder/helloworld.py",
"properties-file": __dir__() + "/../grinder/grinder.properties"}})
res_files = obj.resource_files()
artifacts = os.listdir(obj.engine.artifacts_dir)
self.assertEqual(len(res_files), 2)
self.assertEqual(len(artifacts), 2)
示例3: test_resource_files_collection_invalid
# 需要导入模块: from bzt.modules.grinder import GrinderExecutor [as 别名]
# 或者: from bzt.modules.grinder.GrinderExecutor import resource_files [as 别名]
def test_resource_files_collection_invalid(self):
obj = GrinderExecutor()
obj.engine = EngineEmul()
obj.execution.merge({"scenario": {"script": "tests/grinder/helloworld.py",
"properties-file": "tests/grinder/grinder_invalid.properties"}})
res_files = obj.resource_files()
artifacts = os.listdir(obj.engine.artifacts_dir)
self.assertEqual(len(res_files), 2)
self.assertEqual(len(artifacts), 2)
self.assertIn("helloworld.py", open(os.path.join(obj.engine.artifacts_dir,
"grinder_invalid.properties")).read())
示例4: test_resource_files_collection_basic
# 需要导入模块: from bzt.modules.grinder import GrinderExecutor [as 别名]
# 或者: from bzt.modules.grinder.GrinderExecutor import resource_files [as 别名]
def test_resource_files_collection_basic(self):
obj = GrinderExecutor()
obj.engine = EngineEmul()
obj.execution.merge({"scenario": {"script": __dir__() + "/../grinder/helloworld.py"}})
res_files = obj.resource_files()
self.assertEqual(len(res_files), 1)