本文整理汇总了Python中hydeengine.file_system.File.copy_to方法的典型用法代码示例。如果您正苦于以下问题:Python File.copy_to方法的具体用法?Python File.copy_to怎么用?Python File.copy_to使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类hydeengine.file_system.File
的用法示例。
在下文中一共展示了File.copy_to方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_process_page_rendering
# 需要导入模块: from hydeengine.file_system import File [as 别名]
# 或者: from hydeengine.file_system.File import copy_to [as 别名]
def test_process_page_rendering(self):
self.generator = Generator(TEST_SITE.path)
self.generator.build_siteinfo()
source = File(TEST_ROOT.child("test_src.html"))
self.site.refresh()
self.site.monitor(self.queue)
t = Thread(target=self.checker,
kwargs={"asserter":self.assert_valid_html})
t.start()
source.copy_to(self.site.content_folder.child("test.html"))
t.join()
assert self.exception_queue.empty()
示例2: test_underscored_pages_are_not_rendered
# 需要导入模块: from hydeengine.file_system import File [as 别名]
# 或者: from hydeengine.file_system.File import copy_to [as 别名]
def test_underscored_pages_are_not_rendered(self):
self.generator = Generator(TEST_SITE.path)
self.generator.build_siteinfo()
source = File(TEST_ROOT.child("test_src.html"))
target = File(self.site.content_folder.child("_test.html"))
self.site.refresh()
self.site.monitor(self.queue)
t = Thread(target=self.checker,
kwargs={"asserter":self.assert_layout_not_rendered})
t.start()
source.copy_to(target)
t.join()
target.delete()
assert self.exception_queue.empty()
示例3: test_textile
# 需要导入模块: from hydeengine.file_system import File [as 别名]
# 或者: from hydeengine.file_system.File import copy_to [as 别名]
def test_textile(self):
try:
import textile
except ImportError:
textile = False
print "Textile not found, skipping unit tests"
if textile:
self.generator = Generator(TEST_SITE.path)
self.generator.build_siteinfo()
source = File(TEST_ROOT.child("src_test_textile.html"))
self.site.refresh()
self.site.monitor(self.queue)
t = Thread(target=self.checker,
kwargs={"asserter":self.assert_valid_textile})
t.start()
source.copy_to(self.site.content_folder.child("test.html"))
t.join()
assert self.exception_queue.empty()
示例4: test_process_css_with_templates
# 需要导入模块: from hydeengine.file_system import File [as 别名]
# 或者: from hydeengine.file_system.File import copy_to [as 别名]
def test_process_css_with_templates(self):
original_MP = settings.MEDIA_PROCESSORS
original_site = settings.SITE_ROOT
settings.MEDIA_PROCESSORS = {"*":{".css":
('hydeengine.media_processors.TemplateProcessor',)}}
settings.SITE_ROOT = "www.hyde-test.bogus/"
self.generator = Generator(TEST_SITE.path)
self.generator.build_siteinfo()
source = File(TEST_ROOT.child("test_src.css"))
self.site.refresh()
self.site.monitor(self.queue)
t = Thread(target=self.checker,
kwargs={"asserter":self.assert_valid_css})
t.start()
source.copy_to(self.site.media_folder.child("test.css"))
t.join()
settings.MEDIA_PROCESSORS = original_MP
settings.SITE_ROOT = original_site
assert self.exception_queue.empty()
示例5: test_restructuredtext
# 需要导入模块: from hydeengine.file_system import File [as 别名]
# 或者: from hydeengine.file_system.File import copy_to [as 别名]
def test_restructuredtext(self):
try:
import docutils
except ImportError:
docutils = False
print "Docutils not found, skipping unit tests"
if docutils:
self.generator = Generator(TEST_SITE.path)
self.generator.build_siteinfo()
source = File(TEST_ROOT.child("src_test_restructuredtext.html"))
self.site.refresh()
assert self.queue.empty()
self.site.monitor(self.queue)
t = Thread(target=self.checker,
kwargs={"asserter":self.assert_valid_restructuredtext})
t.start()
target = File(self.site.content_folder.child("test.html"))
source.copy_to(target)
t.join()
target.delete()
assert self.exception_queue.empty()
示例6: test_markdown
# 需要导入模块: from hydeengine.file_system import File [as 别名]
# 或者: from hydeengine.file_system.File import copy_to [as 别名]
def test_markdown(self):
try:
import markdown
except ImportError:
markdown = False
print "Markdown not found, skipping unit tests"
if markdown:
self.generator = Generator(TEST_SITE.path)
self.generator.build_siteinfo()
source = File(TEST_ROOT.child("src_test_markdown.html"))
self.site.refresh()
assert self.queue.empty()
self.site.monitor(self.queue)
t = Thread(target=self.checker,
kwargs={"asserter":self.assert_valid_markdown})
t.start()
target = File(self.site.content_folder.child("test_md.html"))
source.copy_to(target)
t.join()
target.delete()
assert self.exception_queue.empty()