forked from pyecharts/pyecharts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable new feature in echarts-china-cities-js: 370 city contours (pye…
…charts#1111) * ✨ introduce shape only geojson shapes * 💚 fix broken unit test * Fix: test * Format: code
- Loading branch information
1 parent
755afe4
commit d763873
Showing
3 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"JUPYTER_URL": "/nbextensions/echarts-china-cities-js", | ||
"GITHUB_URL": "https://echarts-maps.github.io/echarts-china-cities-js", | ||
"JUPYTER_ENTRY": "echarts-china-cities-js/index", | ||
"JS_FOLDER": "js", | ||
"GEOJSON_FOLDER": "geojson", | ||
"PINYIN_MAP": { | ||
"安庆": "an1_qing4" | ||
}, | ||
"FILE_MAP": { | ||
"an1_qing4": "shape-with-internal-borders/an1_hui1_an1_qing4" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import os | ||
from unittest.mock import patch | ||
|
||
from nose.tools import eq_ | ||
|
||
from pyecharts.datasets import EXTRA, register_url | ||
|
||
|
||
@patch("pyecharts.datasets.urllib.request.urlopen") | ||
def test_register_url(fake): | ||
current_path = os.path.dirname(__file__) | ||
with open( | ||
os.path.join(current_path, "fixtures", "registry.json"), encoding="utf8" | ||
) as f: | ||
fake.return_value = f | ||
register_url("fake_url") | ||
eq_( | ||
EXTRA, | ||
{ | ||
"https://echarts-maps.github.io/echarts-china-cities-js/js/": { | ||
"安庆": ["shape-with-internal-borders/an1_hui1_an1_qing4", "js"] | ||
} | ||
}, | ||
) |