Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8400592

Browse files
appleapple
authored andcommitted
Replace all unregister_scale with deregister_scale
1 parent 0081c89 commit 8400592

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

lib/matplotlib/tests/test_scale.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ def set_default_locators_and_formatters(self, axis):
330330
ax.set_xscale('custom')
331331
assert isinstance(ax.xaxis.get_transform(), CustomTransform)
332332
finally:
333-
# cleanup - there's no public unregister_scale()
333+
# cleanup - there's no public deregister_scale()
334334
del mscale._scale_mapping["custom"]
335335
del mscale._scale_has_axis_parameter["custom"]
336336

@@ -368,7 +368,7 @@ def set_default_locators_and_formatters(self, axis):
368368
ax.set_xscale('custom')
369369
assert isinstance(ax.xaxis.get_transform(), CustomTransform)
370370
finally:
371-
# cleanup - there's no public unregister_scale()
371+
# cleanup - there's no public deregister_scale()
372372
del mscale._scale_mapping["custom"]
373373
del mscale._scale_has_axis_parameter["custom"]
374374

@@ -436,7 +436,7 @@ def test_val_in_range_base_fallback():
436436

437437

438438
def test_deregister_scale():
439-
"""Test that unregister_scale removes a scale correctly."""
439+
"""Test that deregister_scale removes a scale correctly."""
440440
# Register a temporary custom scale
441441
class TempScale(mscale.LinearScale):
442442
name = 'temp_test_scale'
@@ -450,6 +450,6 @@ class TempScale(mscale.LinearScale):
450450

451451

452452
def test_deregister_scale_invalid():
453-
"""Test that unregister_scale raises ValueError for unknown scale."""
453+
"""Test that deregister_scale raises ValueError for unknown scale."""
454454
with pytest.raises(ValueError, match="not registered"):
455455
mscale.deregister_scale('this_does_not_exist')

0 commit comments

Comments
 (0)