Skip to content

Commit 66511a1

Browse files
authored
test error passing AxesGrid and nrow or ncol (#182)
1 parent 6e97746 commit 66511a1

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
### Enhancements
2222

2323
- Add python 3.13 to list of supported versions ([#158](https://github.com/mpytools/mplotutils/pull/158)).
24-
- Increased test coverage ([#180](https://github.com/mpytools/mplotutils/pull/180), and [#181](https://github.com/mpytools/mplotutils/pull/181)).
24+
- Increased test coverage ([#180](https://github.com/mpytools/mplotutils/pull/180), [#181](https://github.com/mpytools/mplotutils/pull/181),
25+
and [#182](https://github.com/mpytools/mplotutils/pull/182)).
2526

2627
### Bug fixes
2728

mplotutils/tests/test_set_map_layout_axes_grid.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,22 @@
77
from . import figure_context, get_rtol
88

99

10+
def test_set_map_layout_error_ncol_nrow():
11+
with figure_context() as f:
12+
13+
axgr = AxesGrid(f, 111, nrows_ncols=(1, 1))
14+
15+
msg = "Cannot pass 'nrow' or 'ncol' for and 'AxesGrid'"
16+
with pytest.raises(TypeError, match=msg):
17+
set_map_layout(axgr, ncol=1)
18+
19+
with pytest.raises(TypeError, match=msg):
20+
set_map_layout(axgr, nrow=1)
21+
22+
with pytest.raises(TypeError, match=msg):
23+
set_map_layout(axgr, nrow=1, ncol=1)
24+
25+
1026
def test_set_map_layout_default_width():
1127
with figure_context() as f:
1228

0 commit comments

Comments
 (0)