pyecharts/test/utils.py
陈键冬 8f16369400 Charts docs update and pink everything (#536)
* Update: docs update

* Update: 统一注释文档风格

* Update: pink echarts folder

* Update: pink charts folder

* Update: pink custom folder

* Update: pink pyecharts and dataset folder

* Update: pink test folder

* Update: pink utils folder

* Update: micro docs update for theme

* Fix: fixed broken test
2018-05-04 22:37:27 +08:00

23 lines
589 B
Python

import os
import codecs
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)