Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Smoke Test for Axes.step #27162

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

Closed
wants to merge 3 commits into from
Closed

Smoke Test for Axes.step #27162

wants to merge 3 commits into from

Conversation

0taj
Copy link
Contributor

@0taj 0taj commented Oct 21, 2023

PR summary

Smoke test for Axes.step using datetime data in lib/matplotlib/tests/test_datetime.py. This PR addresses one of the tasks listed in #26864

The image displays the plot of the test case:
test_step

PR checklist

Copy link
Member

@ksunden ksunden left a comment

Choose a reason for hiding this comment

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

Could be simplified a bit, but it is largely fine:

  • Use np.arange instead of np.array(range(...))
  • Could even use np.arange for the dates e.g.:
np.arange(start_date, start_date+datetime.timedelta(weeks=1), datetime.timedelta(days=1))

Does work

Also the last axes using the data arg I don't think really needs to be tested here, its not wrong, but it is testing a broader functionality that is largely orthogonal.

@scottshambaugh
Copy link
Contributor

Hi @0taj thank you for your contribution! Unfortunately it looks like #27091 also implemented this test and was opened as a PR first, so I'm closing this one as a duplicate. However I would encourage you to pick out another of the functions from the list in #26864 and take a shot at it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants