pyecharts/test/utils.py
jaska d61f715566 oop options and doc update (#498)
* 格式化 setup.py

* 📚 update documentation

* 🔬 unit test options

* Update test_options.py

* 💚 update test case

* 🔨 getting oop options

* 🚜 relocate option.py, events.py, style.py to echarts

* 💚 make unit tests pass

* 🎨 fix remain bugs

* 💚 last bug fix

* 🐛 fix #493, pip 10.0.x compactibility issue

* 🎨 more pythonic code

* 🐛 fix inheritance

* 👕 whitening

* 🚜 rename city coordinates.json

* 🚜 update json serializable interface

* 🔨 **kwargs comes back

* Remove: 移除重复配置项
2018-04-25 17:13:00 +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)