Skip to content

Commit b0c6c88

Browse files
committed
updated unittest
1 parent 2e8a409 commit b0c6c88

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

ultraplot/figure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1686,8 +1686,8 @@ def format(
16861686
classes = set() # track used dictionaries
16871687
for number, ax in enumerate(axs):
16881688
number = number + 1 # number from m1
1689+
store_old_number = ax.number
16891690
if ax.number != number:
1690-
store_old_number = ax.number
16911691
ax.number = number
16921692
kw = {
16931693
key: value

ultraplot/tests/test_axes.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,8 @@ def test_subset_format():
181181
fig, axs = uplt.subplots(nrows=1, ncols=3)
182182
axs[1:].format(title=["a", "b"]) # allowed
183183
# Subset formatting
184-
with pytest.raises(ValueError):
185-
axs[1:].format(title=["c", "d", "e"])
184+
axs[1:].format(title=["c", "d", "e"]) # allowed but implicit does not use e
185+
assert axs[-1].get_title() == "d"
186186
# Shorter than number of axs
187187
with pytest.raises(ValueError):
188188
axs.format(title=["a"])
189-
# Longer than number of axs
190-
with pytest.raises(ValueError):
191-
axs.format(title=["a", "b", "c", "d"])

0 commit comments

Comments
 (0)