Skip to content

Moving get_ax and do_event to testing #7372

Closed

Description

@jakirkham

I'm wanting to do some testing in a library that uses matplotlib. In particular, this library is using matplotlib native widgets.

There appear to be some utility functions used for testing called get_ax and do_event. These seem like they would be very handy for widget tests like the ones proposed above.

However, I'm not entirely clear on how they can access them ATM as they don't seem to be importable and they are not in testing currently. Would it be possible to move them to testing so they could be used externally? Related would that actually make sense/be usable for my use case?

Activity

  1. tacaswell commented on Nov 1, 2016

    @tacaswell
    Member

    👍

    They are not importable because some packings of mpl strip off the the tests module (there is a lot of binary image data in there).

  2. added this to the milestone on Nov 1, 2016
  3. jakirkham commented on Nov 1, 2016

    @jakirkham
    Author

    They are not importable because some packings of mpl strip off the the tests module (there is a lot of binary image data in there).

    That's totally reasonable.

    Just wanted to make sure I wasn't missing something big w.r.t. using these functions externally. For instance, will I need to have configured an interactive backend to get them to work?

  4. tacaswell commented on Nov 1, 2016

    @tacaswell
    Member

    Doesn't look like it.

    That docstring is also very wrong...

  5. jakirkham commented on Nov 1, 2016

    @jakirkham
    Author

    Yep, it could use some help. 😄

    Alright, I've put this on my ToDos. Can't promise I'll get to it soon, but I do plan to come back to it.

  6. modified the milestones: , on Oct 3, 2017
  7. added
    🌱 Good first issueOpen a pull request against these issues if there are no active ones!
    on Oct 16, 2017
  8. added a commit that references this issue on Dec 1, 2017
  9. SidharthBansal commented on Apr 4, 2020

    @SidharthBansal
    Contributor

    lib/matplotlib/testing/widgets.py doesn't exist, so to which file should i move these methods?

  10. tacaswell commented on Apr 4, 2020

    @tacaswell
    Member

    @SidharthBansal Please make that file.

  11. tacaswell commented on Apr 4, 2020

    @tacaswell
    Member

    I suggest taking the commits in #9905, rebasing them on master, pushing to a branch on your fork and then leaving a note on that 9905 that you have taken over the work.

  12. added a commit that references this issue on Apr 4, 2020
    07e33f5
  13. modified the milestones: needs sorting, v3.3.0 on Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty: Easyhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issues🌱 Good first issueOpen a pull request against these issues if there are no active ones!

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions