當前位置: 首頁>>代碼示例>>Python>>正文


Python Fixture.append_no_story_header方法代碼示例

本文整理匯總了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)
開發者ID:rootart,項目名稱:pyccuracy,代碼行數:22,代碼來源:parsers.py

示例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"
開發者ID:heynemann,項目名稱:pyccuracy,代碼行數:6,代碼來源:test_fixture.py

示例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
開發者ID:heynemann,項目名稱:pyccuracy,代碼行數:6,代碼來源:test_fixture.py


注:本文中的pyccuracy.fixture.Fixture.append_no_story_header方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。