Skip to content

Added unit tests for contour of matplotlib tests#2806

Merged
hvy merged 1 commit intooptuna:masterfrom
01-vyom:test-contour-2643
Jul 19, 2021
Merged

Added unit tests for contour of matplotlib tests#2806
hvy merged 1 commit intooptuna:masterfrom
01-vyom:test-contour-2643

Conversation

@01-vyom
Copy link
Copy Markdown
Contributor

@01-vyom 01-vyom commented Jul 14, 2021

Motivation

Added more test cases to optuna/visualization/matplotlib/test_contour.py
closes #2643

Description of the changes

  • Checked number of lines
  • Checked title of figure
  • Checked label of figure

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

Merging #2806 (d2e67e7) into master (d1269df) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2806   +/-   ##
=======================================
  Coverage   91.72%   91.72%           
=======================================
  Files         146      146           
  Lines       11150    11150           
=======================================
  Hits        10227    10227           
  Misses        923      923           

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 d1269df...d2e67e7. Read the comment docs.

Copy link
Copy Markdown
Member

@nzw0301 nzw0301 left a comment

Choose a reason for hiding this comment

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

As always, the pull request looks great to me! Thanks!

Copy link
Copy Markdown
Member

@hvy hvy left a comment

Choose a reason for hiding this comment

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

Thanks a lot. I left a minor comment but this change is an improvement and there are seemingly other PRs waiting for this change, so let me merge this PR as is. LGTM!

assert not figure.has_data()
assert len(figure.get_lines()) == 0
elif len(params) == 2:
# TODO(ytknzw): Add more specific assertion with the test case.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm wondering if this TODO isn't still applicable but it's a minor.

@hvy hvy merged commit dd3acef into optuna:master Jul 19, 2021
@hvy hvy added this to the v2.9.0 milestone Jul 19, 2021
@01-vyom 01-vyom deleted the test-contour-2643 branch July 19, 2021 05:42
@hvy hvy changed the title TST: Added unit tests for contour of matplotlib tests Added unit tests for contour of matplotlib tests Jul 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Unit test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add more test cases in optuna/visualization/matplotlib/*.py

4 participants