Skip to content

Commit c4bfcca

Browse files
committed
Minor fix for tests
1 parent 1dd12ef commit c4bfcca

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

tests/test_plotters.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1738,14 +1738,16 @@ def _label_test(self, key, label_func, has_time=None):
17381738
def test_rotated_pole_poly():
17391739
"""Test function for https://github.com/psyplot/psy-maps/issues/28"""
17401740
test_file = os.path.join(bt.test_dir, "rotated-pole-test.nc")
1741-
with psy.plot.mapplot(test_file, plot="poly") as sp:
1741+
# select rlon and rlat manually to make sure we do not use the coordinates
1742+
decoder_kws = {"x": "rlon", "y": "rlat"}
1743+
with psy.plot.mapplot(test_file, plot="poly", decoder=decoder_kws) as sp:
17421744
plotter = sp.plotters[0]
17431745
minx, maxx = plotter.ax.get_xlim()
17441746
miny, maxy = plotter.ax.get_ylim()
1745-
assert abs(minx - -30.88) < 2
1746-
assert abs(maxx - 19.95) < 2
1747-
assert abs(miny - -26.21) < 2
1748-
assert abs(maxy - 31.88) < 2
1747+
assert abs(minx - -32.2) < 2
1748+
assert abs(maxx - 22) < 2
1749+
assert abs(miny - -27.14) < 2
1750+
assert abs(maxy - 25.6) < 2
17491751

17501752

17511753
def test_plot_poly_3D_bounds():

0 commit comments

Comments
 (0)