diff --git a/test.py b/test.py index 1522b28b..4796ee4a 100644 --- a/test.py +++ b/test.py @@ -1,4 +1,4 @@ import os -os.system("nosetests --with-coverage --cover-package pyecharts --cover-package") +os.system("nosetests --with-coverage --cover-package pyecharts --cover-package .") os.system("flake8 --exclude build --max-line-length 89 --ignore=F401") diff --git a/test/test_base.py b/test/test_base.py index dcb5f377..b1c204ca 100644 --- a/test/test_base.py +++ b/test/test_base.py @@ -35,7 +35,5 @@ def test_render(fake_writer): def test_base_iso_format(): mock_time_str = "2022-04-14 14:42:00" - assert ( - default(datetime.strptime(mock_time_str, "%Y-%m-%d %H:%M:%S")) - == "2022-04-14T14:42:00" - ) + mock_time = datetime.strptime(mock_time_str, "%Y-%m-%d %H:%M:%S") + assert (default(mock_time) == "2022-04-14T14:42:00") diff --git a/test/test_chart_options.py b/test/test_chart_options.py index 17e64bbb..902fb83c 100644 --- a/test/test_chart_options.py +++ b/test/test_chart_options.py @@ -98,4 +98,3 @@ def test_tree_map_item_style_options_remove_none(): "borderWidth": 0, } assert_equal(expected, remove_key_with_none_value(option.opts)) - diff --git a/test/test_custom.py b/test/test_custom.py index 362fc23e..fd8fb8c2 100644 --- a/test/test_custom.py +++ b/test/test_custom.py @@ -19,7 +19,6 @@ def test_custom_base(fake_writer): var start = api.coord([api.value(1), categoryIndex]); var end = api.coord([api.value(2), categoryIndex]); var height = api.size([0, 1])[1] * 0.6; - var rectShape = echarts.graphic.clipRectByRect({ x: start[0], y: start[1] - height / 2, @@ -31,7 +30,6 @@ def test_custom_base(fake_writer): width: params.coordSys.width, height: params.coordSys.height }); - return rectShape && { type: 'rect', shape: rectShape, diff --git a/test/test_lines3d.py b/test/test_lines3d.py index 39bff29c..93dfd9b2 100644 --- a/test/test_lines3d.py +++ b/test/test_lines3d.py @@ -9,7 +9,8 @@ from pyecharts.charts import Lines3D @patch("pyecharts.render.engine.write_utf8_html_file") def test_lines3d_base(fake_writer): - test_main_url: str = "https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/examples" + test_main_url: str = \ + "https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/examples" data_json_url = test_main_url + "/data-gl/asset/data/flights.json" base_texture = test_main_url + "/data-gl/asset/world.topo.bathy.200401.jpg" height_texture = test_main_url + "/data-gl/asset/bathymetry_bw_composite_4k.jpg" diff --git a/test/test_mixins.py b/test/test_mixins.py index bc5dd228..94096f5d 100644 --- a/test/test_mixins.py +++ b/test/test_mixins.py @@ -24,4 +24,3 @@ def test_composite_mixin_len(): c.add(b_1, "bar") c.add(b_2, "line") assert len(c) == 2 - diff --git a/test/test_utils.py b/test/test_utils.py index 7245deac..9409afee 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -8,8 +8,12 @@ def test_utils_produce_require_dict(): assert_equal(cfg["config_items"], ["'echarts':'https://example.comecharts.min'"]) assert_equal(cfg["libraries"], ["'echarts'"]) - cfg_1 = utils.produce_require_dict(utils.OrderedSet("https://api.map.baidu.com"), "https://example.com") - assert_equal(cfg_1["config_items"], ["'baidu_map_api25':'https://api.map.baidu.com'"]) + cfg_1 = utils.produce_require_dict( + utils.OrderedSet("https://api.map.baidu.com"), "https://example.com", + ) + assert_equal( + cfg_1["config_items"], ["'baidu_map_api25':'https://api.map.baidu.com'"], + ) assert_equal(cfg_1["libraries"], ["'baidu_map_api25'"])