Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add: tests #1061

Merged
merged 4 commits into from May 5, 2019
Merged

Add: tests #1061

merged 4 commits into from May 5, 2019

Conversation

chenjiandongx
Copy link
Member

本次 PR 内容,

  1. 新增测试用例

@codecov-io
Copy link

codecov-io commented May 4, 2019

Codecov Report

Merging #1061 into dev will increase coverage by 0.49%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #1061      +/-   ##
==========================================
+ Coverage   78.59%   79.09%   +0.49%     
==========================================
  Files          79       80       +1     
  Lines        1640     1674      +34     
==========================================
+ Hits         1289     1324      +35     
+ Misses        351      350       -1
Impacted Files Coverage Δ
pyecharts/charts/composite_charts/timeline.py 100% <ø> (ø) ⬆️
pyecharts/render/display.py 31.25% <ø> (ø) ⬆️
pyecharts/options/global_options.py 83.92% <ø> (+0.89%) ⬆️
pyecharts/charts/threeD_charts/bar3D.py 100% <ø> (ø) ⬆️
pyecharts/charts/threeD_charts/scatter3D.py 100% <ø> (ø) ⬆️
pyecharts/commons/types.py 100% <ø> (ø) ⬆️
pyecharts/globals.py 100% <ø> (ø) ⬆️
pyecharts/components/table.py 50% <ø> (ø) ⬆️
pyecharts/exceptions.py 0% <ø> (ø) ⬆️
pyecharts/charts/threeD_charts/surface3D.py 100% <ø> (ø) ⬆️
... and 13 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6425c8b...839a65b. Read the comment docs.

@chenjiandongx
Copy link
Member Author

chenjiandongx commented May 4, 2019

@chfw @sunhailin-Leo 可以往这个分支上继续补充测试用例。

此分支目前还未准备好 merge

from ..commons.types import JSFunc, List, Numeric, Optional, Sequence, Tuple, Union


class BasicOpts:
pass
opts: Union[dict, Sequence, None] = None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是 class 属性。

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我知道 不过没什么影响

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

用 None 其实也可以

@@ -11,3 +14,61 @@ def test_bar_base():
assert c.theme == "white"
assert c.renderer == "canvas"
c.render("render.html")


@patch("pyecharts.render.engine.write_utf8_html_file")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and will protect my SSD hard disk when running pyecharts unit tests.

chfw
chfw previously approved these changes May 4, 2019
Copy link
Member

@chfw chfw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to go!

@chenjiandongx chenjiandongx merged commit 2b94085 into dev May 5, 2019
@chenjiandongx chenjiandongx deleted the more-tests branch May 5, 2019 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants