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 c4f25e9

Browse filesBrowse files
author
Fabian Kloosterman
committed
enhanced tests
1 parent 8418f09 commit c4f25e9
Copy full SHA for c4f25e9

File tree

Expand file treeCollapse file tree

1 file changed

+8
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-0
lines changed

‎lib/matplotlib/tests/test_scale.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_scale.py
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from matplotlib.testing.decorators import image_comparison
44
import matplotlib.pyplot as plt
5+
from matplotlib.scale import Log10Transform, InvertedLog10Transform
56
import numpy as np
67
import io
78
import pytest
@@ -80,12 +81,19 @@ def test_logscale_invert_transform():
8081
# get transformation from data to axes
8182
tform = (ax.transAxes + ax.transData.inverted()).inverted()
8283

84+
# direct test of log transform inversion
85+
assert isinstance(Log10Transform().inverted(), InvertedLog10Transform)
8386

8487
def test_logscale_transform_repr():
88+
# check that repr of log transform succeeds
8589
fig, ax = plt.subplots()
8690
ax.set_yscale('log')
8791
s = repr(ax.transData)
8892

93+
# check that repr of log transform returns correct string
94+
s = repr(Log10Transform(nonpos='clip'))
95+
assert s == "Log10Transform('clip')"
96+
8997

9098
@image_comparison(baseline_images=['logscale_nonpos_values'], remove_text=True,
9199
extensions=['png'], style='mpl20')

0 commit comments

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