本文整理匯總了Python中pyccuracy.fixture.Fixture.append_no_story_header方法的典型用法代碼示例。如果您正苦於以下問題:Python Fixture.append_no_story_header方法的具體用法?Python Fixture.append_no_story_header怎麽用?Python Fixture.append_no_story_header使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pyccuracy.fixture.Fixture
的用法示例。
在下文中一共展示了Fixture.append_no_story_header方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: get_stories
# 需要導入模塊: from pyccuracy.fixture import Fixture [as 別名]
# 或者: from pyccuracy.fixture.Fixture import append_no_story_header [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_no_story_header_keeps_file
# 需要導入模塊: from pyccuracy.fixture import Fixture [as 別名]
# 或者: from pyccuracy.fixture.Fixture import append_no_story_header [as 別名]
def test_append_no_story_header_keeps_file():
fixture = Fixture()
fixture.append_no_story_header("some")
assert fixture.no_story_header[0] == "some"
示例3: test_append_no_story_header
# 需要導入模塊: from pyccuracy.fixture import Fixture [as 別名]
# 或者: from pyccuracy.fixture.Fixture import append_no_story_header [as 別名]
def test_append_no_story_header():
fixture = Fixture()
fixture.append_no_story_header("some")
assert len(fixture.no_story_header) == 1