当前位置: 首页>>代码示例>>Python>>正文


Python Engine.parse方法代码示例

本文整理汇总了Python中hyde.engine.Engine.parse方法的典型用法代码示例。如果您正苦于以下问题:Python Engine.parse方法的具体用法?Python Engine.parse怎么用?Python Engine.parse使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在hyde.engine.Engine的用法示例。


在下文中一共展示了Engine.parse方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_ensure_no_exception_when_forced

# 需要导入模块: from hyde.engine import Engine [as 别名]
# 或者: from hyde.engine.Engine import parse [as 别名]
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,代码行数:16,代码来源:test_initialize.py

示例2: test_ensure_can_create_site_at_user

# 需要导入模块: from hyde.engine import Engine [as 别名]
# 或者: from hyde.engine.Engine import parse [as 别名]
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,代码行数:7,代码来源:test_initialize.py

示例3: test_ensure_no_exception_when_sitepath_does_not_exist

# 需要导入模块: from hyde.engine import Engine [as 别名]
# 或者: from hyde.engine.Engine import parse [as 别名]
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,代码行数:7,代码来源:test_initialize.py

示例4: test_ensure_no_exception_when_empty_site_exists

# 需要导入模块: from hyde.engine import Engine [as 别名]
# 或者: from hyde.engine.Engine import parse [as 别名]
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,代码行数:6,代码来源:test_initialize.py

示例5: test_ensure_exception_when_layout_folder_exists

# 需要导入模块: from hyde.engine import Engine [as 别名]
# 或者: from hyde.engine.Engine import parse [as 别名]
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,代码行数:6,代码来源:test_initialize.py

示例6: test_ensure_exception_when_site_yaml_exists

# 需要导入模块: from hyde.engine import Engine [as 别名]
# 或者: from hyde.engine.Engine import parse [as 别名]
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,代码行数:6,代码来源:test_initialize.py

示例7: test_ensure_exception_when_layout_is_invalid

# 需要导入模块: from hyde.engine import Engine [as 别名]
# 或者: from hyde.engine.Engine import parse [as 别名]
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,代码行数:5,代码来源:test_initialize.py

示例8: test_ensure_exception_when_content_folder_exists

# 需要导入模块: from hyde.engine import Engine [as 别名]
# 或者: from hyde.engine.Engine import parse [as 别名]
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,代码行数:6,代码来源:test_initialize.py

示例9: test_ensure_no_exception_when_sitepath_exists_when_forced

# 需要导入模块: from hyde.engine import Engine [as 别名]
# 或者: from hyde.engine.Engine import parse [as 别名]
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,代码行数:6,代码来源:test_initialize.py

示例10: test_ensure_exception_when_sitepath_exists

# 需要导入模块: from hyde.engine import Engine [as 别名]
# 或者: from hyde.engine.Engine import parse [as 别名]
def test_ensure_exception_when_sitepath_exists():
    e = Engine()
    e.run(e.parse(['-s', str(TEST_SITE), 'create']))
开发者ID:MeirKriheli,项目名称:hyde,代码行数:5,代码来源:test_initialize.py


注:本文中的hyde.engine.Engine.parse方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。