pyecharts/test/utils.py
陈键冬 3e7e2bfc77 Lias (#722)
* Add: 新增 lias 工具格式化 imports

* Update: 细节修正

* Fix: fix #721

* Update: var reused

* Format: 格式化导包顺序

* Update: modules import order: python builtin imports on top, 3rd parties libraries in the middle, package's own libraries in the bottom
2018-09-01 16:07:00 +08:00

23 lines
589 B
Python

import codecs
import os
def get_default_rendering_file_content(file_name="render.html"):
"""
Simply returns the content render.html
"""
with codecs.open(file_name, "r", "utf-8") as f:
return f.read()
def get_fixture_content(file_name):
fixture_file = os.path.join("fixtures", file_name)
with codecs.open(fixture_file, "r", "utf-8") as f:
return f.read()
def store_fixture_content(file_name, content):
fixture_file = os.path.join("fixtures", file_name)
with codecs.open(fixture_file, "w", "utf-8") as f:
return f.write(content)