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

Commit 98c1745

Browse filesBrowse files
rgbmrcQuLogic
andauthored
parametrize test_grid_axes_position
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
1 parent 69828e7 commit 98c1745
Copy full SHA for 98c1745

File tree

Expand file treeCollapse file tree

1 file changed

+7
-7
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-7
lines changed

‎lib/mpl_toolkits/tests/test_axes_grid1.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/tests/test_axes_grid1.py
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -483,12 +483,12 @@ def test_grid_axes_lists():
483483
assert_array_equal(grid, np.ravel(grid.axes_column), "column")
484484

485485

486-
def test_grid_axes_position():
486+
@pytest.mark.parametrize('direction', ('row', 'column'))
487+
def test_grid_axes_position(direction):
487488
"""Test positioning of the axes in Grid."""
488489
fig = plt.figure()
489-
for dir in ("row", "column"):
490-
grid = Grid(fig, 111, (2, 2), direction=dir)
491-
loc = [ax.get_axes_locator() for ax in np.ravel(grid.axes_row)]
492-
assert loc[1]._nx > loc[0]._nx and loc[2]._ny < loc[0]._ny, dir
493-
assert loc[0]._nx == loc[2]._nx and loc[0]._ny == loc[1]._ny, dir
494-
assert loc[3]._nx == loc[1]._nx and loc[3]._ny == loc[2]._ny, dir
490+
grid = Grid(fig, 111, (2, 2), direction=direction)
491+
loc = [ax.get_axes_locator() for ax in np.ravel(grid.axes_row)]
492+
assert loc[1]._nx > loc[0]._nx and loc[2]._ny < loc[0]._ny
493+
assert loc[0]._nx == loc[2]._nx and loc[0]._ny == loc[1]._ny
494+
assert loc[3]._nx == loc[1]._nx and loc[3]._ny == loc[2]._ny

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.