mirror of
https://github.com/pyecharts/pyecharts.git
synced 2026-02-01 17:46:01 +00:00
🔬 more test coverage
This commit is contained in:
parent
c722b0f6aa
commit
7b9631694b
2
test/fixtures/registry.json
vendored
2
test/fixtures/registry.json
vendored
@ -1,5 +1,5 @@
|
||||
{
|
||||
"JUPYTER_URL": "/nbextensions/test-js/",
|
||||
"JUPYTER_URL": "/nbextensions/test-js",
|
||||
"GITHUB_URL": "https://your.github.io/test-js/test-js",
|
||||
"JUPYTER_ENTRY": "test-js/index",
|
||||
"JS_FOLDER": "test-js",
|
||||
|
||||
@ -22,6 +22,12 @@ def test_get_js_link():
|
||||
eq_(actual, './fixtures/test-js/the_js_file_name.js')
|
||||
|
||||
|
||||
def test_get_js_link_no_match():
|
||||
test_extension = produce_test_js_extension()
|
||||
actual = test_extension.get_js_link('missing')
|
||||
assert actual is None
|
||||
|
||||
|
||||
def test_get_js_link_use_github():
|
||||
test_extension = produce_test_js_extension()
|
||||
actual = test_extension.get_js_link('pinyin', jshost='local/path')
|
||||
@ -31,7 +37,13 @@ def test_get_js_link_use_github():
|
||||
def test_require_config():
|
||||
test_extension = produce_test_js_extension()
|
||||
actual = test_extension.produce_require_config_syntax('pinyin')
|
||||
eq_(actual, "'pinyin': '/nbextensions/test-js//the_js_file_name'")
|
||||
eq_(actual, "'pinyin': '/nbextensions/test-js/the_js_file_name'")
|
||||
|
||||
|
||||
def test_require_config_no_match():
|
||||
test_extension = produce_test_js_extension()
|
||||
actual = test_extension.produce_require_config_syntax('missing')
|
||||
assert actual is None
|
||||
|
||||
|
||||
def test_read_js_library():
|
||||
@ -42,3 +54,9 @@ def test_read_js_library():
|
||||
content = test_extension.read_js_library('pinyin')
|
||||
assert 'test_read_js_library' in content
|
||||
patcher.stop()
|
||||
|
||||
|
||||
def test_read_js_library_no_match():
|
||||
test_extension = produce_test_js_extension()
|
||||
content = test_extension.read_js_library('missing')
|
||||
assert content is None
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user