MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_customcell

Function test_customcell

lib/matplotlib/tests/test_table.py:107–123  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

105
106
107def test_customcell():
108 types = ('horizontal', 'vertical', 'open', 'closed', 'T', 'R', 'B', 'L')
109 codes = (
110 (Path.MOVETO, Path.LINETO, Path.MOVETO, Path.LINETO, Path.MOVETO),
111 (Path.MOVETO, Path.MOVETO, Path.LINETO, Path.MOVETO, Path.LINETO),
112 (Path.MOVETO, Path.MOVETO, Path.MOVETO, Path.MOVETO, Path.MOVETO),
113 (Path.MOVETO, Path.LINETO, Path.LINETO, Path.LINETO, Path.CLOSEPOLY),
114 (Path.MOVETO, Path.MOVETO, Path.MOVETO, Path.LINETO, Path.MOVETO),
115 (Path.MOVETO, Path.MOVETO, Path.LINETO, Path.MOVETO, Path.MOVETO),
116 (Path.MOVETO, Path.LINETO, Path.MOVETO, Path.MOVETO, Path.MOVETO),
117 (Path.MOVETO, Path.MOVETO, Path.MOVETO, Path.MOVETO, Path.LINETO),
118 )
119
120 for t, c in zip(types, codes):
121 cell = CustomCell((0, 0), visible_edges=t, width=1, height=1)
122 code = tuple(s for _, s in cell.get_path().iter_segments())
123 assert c == code
124
125
126@image_comparison(['table_auto_column.png'], style='mpl20')

Callers

nothing calls this directly

Calls 2

iter_segmentsMethod · 0.80
get_pathMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…