Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix twin remove #5682

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 5 commits into from
Dec 15, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
TST: more tests of Grouper
This test touches the internals, if Grouper gets refactored this
test should be removed.
  • Loading branch information
tacaswell committed Dec 15, 2015
commit db34cb7f66ab8f80d889ea9e8e86a0e83c0c4daf
18 changes: 18 additions & 0 deletions 18 lib/matplotlib/tests/test_cbook.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import itertools
from weakref import ref

from matplotlib.externals import six

Expand Down Expand Up @@ -397,3 +398,20 @@ class dummy():

for A, B in itertools.product(objs[1:], objs[1:]):
assert g.joined(A, B)


def test_grouper_private():
class dummy():
pass
objs = [dummy() for j in range(5)]
g = cbook.Grouper()
g.join(*objs)
# reach in and touch the internals !
mapping = g._mapping

for o in objs:
assert ref(o) in mapping

base_set = mapping[ref(objs[0])]
for o in objs[1:]:
assert mapping[ref(o)] is base_set
Morty Proxy This is a proxified and sanitized view of the page, visit original site.