本文整理汇总了Python中pyccuracy.fixture.Fixture.append_invalid_test_file方法的典型用法代码示例。如果您正苦于以下问题:Python Fixture.append_invalid_test_file方法的具体用法?Python Fixture.append_invalid_test_file怎么用?Python Fixture.append_invalid_test_file使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyccuracy.fixture.Fixture
的用法示例。
在下文中一共展示了Fixture.append_invalid_test_file方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_stories
# 需要导入模块: from pyccuracy.fixture import Fixture [as 别名]
# 或者: from pyccuracy.fixture.Fixture import append_invalid_test_file [as 别名]
def get_stories(self, settings):
if not self.language:
self.language = LanguageGetter(settings.default_culture)
fixture = Fixture()
story_file_list = self.file_object.list_files(directories=settings.tests_dirs, pattern=settings.file_pattern)
story_file_list.sort()
for story_file_path in story_file_list:
try:
parsed, error, story = self.parse_story_file(story_file_path, settings)
if parsed:
fixture.append_story(story)
else:
fixture.append_no_story_header(story_file_path)
except IOError, err:
fixture.append_invalid_test_file(story_file_path, err)
except InvalidScenarioError, verr:
fixture.append_no_story_header(story_file_path)
示例2: test_append_invalid_test_file_keeps_file
# 需要导入模块: from pyccuracy.fixture import Fixture [as 别名]
# 或者: from pyccuracy.fixture.Fixture import append_invalid_test_file [as 别名]
def test_append_invalid_test_file_keeps_file():
fixture = Fixture()
fixture.append_invalid_test_file("some", "error")
assert fixture.invalid_test_files[0][0] == "some"
assert fixture.invalid_test_files[0][1] == "error"
示例3: test_append_invalid_test_file
# 需要导入模块: from pyccuracy.fixture import Fixture [as 别名]
# 或者: from pyccuracy.fixture.Fixture import append_invalid_test_file [as 别名]
def test_append_invalid_test_file():
fixture = Fixture()
fixture.append_invalid_test_file("some", "error")
assert len(fixture.invalid_test_files) == 1