Skip to content

Extend unit tests for the Output widget #1983

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

Merged
merged 19 commits into from
Mar 16, 2018

Conversation

pbugnion
Copy link
Member

@pbugnion pbugnion commented Feb 25, 2018

This builds on PR #1934, and the diff currently includes some commits from that PR.

While working on PR #1934, I felt that the test coverage on the Python side of the output widget was somewhat sparse. The difficulty is that a lot of the output widget code relies on IPython.display and IPython methods. I've mocked these out in these tests (using manual monkeypatching, rather than introducing a dependency on a mocking library).

  • Is this useful? I personally think this will help developers like me who are less familiar with the codebase, but happy to discard this if maintainers think it adds too much overhead.
  • Should we write this differently? For instance, we could use a real mocking library rather than my home-grown attempts at one. There isn't (AFAICT) much mocking in unit tests at the moment, so it's probably worth settling on one way of doing things.

@jasongrout
Copy link
Member

I think this looks great. Thanks!

@jasongrout jasongrout merged commit 8196606 into jupyter-widgets:master Mar 16, 2018
@jasongrout jasongrout added this to the Minor release milestone Mar 16, 2018
@pbugnion pbugnion deleted the output-widget-tests branch March 16, 2018 05:50
@jasongrout jasongrout modified the milestones: Minor release, 7.2 Mar 19, 2018
@github-actions github-actions bot added the resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Feb 7, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants