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


Python engine.Engine類代碼示例

本文整理匯總了Python中hyde.engine.Engine的典型用法代碼示例。如果您正苦於以下問題:Python Engine類的具體用法?Python Engine怎麽用?Python Engine使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Engine類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: test_ensure_no_exception_when_forced

def test_ensure_no_exception_when_forced():
    e = Engine(raise_exceptions=True)
    TEST_SITE.child_folder('layout').make()
    e.run(e.parse(['-s', str(TEST_SITE), 'create', '-f']))
    verify_site_contents(TEST_SITE, Layout.find_layout())
    TEST_SITE.delete()
    TEST_SITE.child_folder('content').make()
    e.run(e.parse(['-s', str(TEST_SITE), 'create', '-f']))
    verify_site_contents(TEST_SITE, Layout.find_layout())
    TEST_SITE.delete()
    TEST_SITE.make()
    File(TEST_SITE.child('site.yaml')).write("Hey")
    e.run(e.parse(['-s', str(TEST_SITE), 'create', '-f']))
    verify_site_contents(TEST_SITE, Layout.find_layout())
開發者ID:LestherSK,項目名稱:hyde,代碼行數:14,代碼來源:test_initialize.py

示例2: test_ensure_can_create_site_at_user

def test_ensure_can_create_site_at_user():
    e = Engine(raise_exceptions=True)
    TEST_SITE_AT_USER.delete()
    e.run(e.parse(['-s', str(TEST_SITE_AT_USER), 'create', '-f']))
    verify_site_contents(TEST_SITE_AT_USER, Layout.find_layout())
開發者ID:LestherSK,項目名稱:hyde,代碼行數:5,代碼來源:test_initialize.py

示例3: test_ensure_no_exception_when_sitepath_does_not_exist

def test_ensure_no_exception_when_sitepath_does_not_exist():
    e = Engine(raise_exceptions=True)
    TEST_SITE.delete()
    e.run(e.parse(['-s', str(TEST_SITE), 'create', '-f']))
    verify_site_contents(TEST_SITE, Layout.find_layout())
開發者ID:LestherSK,項目名稱:hyde,代碼行數:5,代碼來源:test_initialize.py

示例4: test_ensure_no_exception_when_empty_site_exists

def test_ensure_no_exception_when_empty_site_exists():
    e = Engine(raise_exceptions=True)
    e.run(e.parse(['-s', str(TEST_SITE), 'create']))
    verify_site_contents(TEST_SITE, Layout.find_layout())
開發者ID:LestherSK,項目名稱:hyde,代碼行數:4,代碼來源:test_initialize.py

示例5: test_ensure_exception_when_layout_folder_exists

def test_ensure_exception_when_layout_folder_exists():
    e = Engine(raise_exceptions=True)
    TEST_SITE.child_folder('layout').make()
    e.run(e.parse(['-s', str(TEST_SITE), 'create']))
開發者ID:LestherSK,項目名稱:hyde,代碼行數:4,代碼來源:test_initialize.py

示例6: test_ensure_exception_when_site_yaml_exists

def test_ensure_exception_when_site_yaml_exists():
    e = Engine(raise_exceptions=True)
    File(TEST_SITE.child('site.yaml')).write("Hey")
    e.run(e.parse(['-s', str(TEST_SITE), 'create']))
開發者ID:LestherSK,項目名稱:hyde,代碼行數:4,代碼來源:test_initialize.py

示例7: test_ensure_exception_when_layout_is_invalid

def test_ensure_exception_when_layout_is_invalid():
    e = Engine(raise_exceptions=True)
    e.run(e.parse(['-s', str(TEST_SITE), 'create', '-l', 'junk']))
開發者ID:LestherSK,項目名稱:hyde,代碼行數:3,代碼來源:test_initialize.py

示例8: test_ensure_exception_when_content_folder_exists

def test_ensure_exception_when_content_folder_exists():
    e = Engine(raise_exceptions=True)
    TEST_SITE.child_folder('content').make()
    e.run(e.parse(['-s', unicode(TEST_SITE), 'create']))
開發者ID:JeNeSuisPasDave,項目名稱:hyde,代碼行數:4,代碼來源:test_initialize.py

示例9: test_ensure_no_exception_when_sitepath_exists_when_forced

def test_ensure_no_exception_when_sitepath_exists_when_forced():
    e = Engine()
    e.run(e.parse(['-s', str(TEST_SITE), 'create', '-f']))
    assert True #No Exception
開發者ID:MeirKriheli,項目名稱:hyde,代碼行數:4,代碼來源:test_initialize.py

示例10: test_ensure_exception_when_sitepath_exists

def test_ensure_exception_when_sitepath_exists():
    e = Engine()
    e.run(e.parse(['-s', str(TEST_SITE), 'create']))
開發者ID:MeirKriheli,項目名稱:hyde,代碼行數:3,代碼來源:test_initialize.py


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