forked from pandas-dev/pandas
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUG, TST: fix-_check_ticks_props (pandas-dev#34768)
- Loading branch information
1 parent
f34fd58
commit df6f668
Showing
3 changed files
with
28 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import pytest | ||
|
||
import pandas.util._test_decorators as td | ||
|
||
from pandas import DataFrame | ||
from pandas.tests.plotting.common import TestPlotBase, _check_plot_works | ||
|
||
|
||
@td.skip_if_no_mpl | ||
class TestCommon(TestPlotBase): | ||
def test__check_ticks_props(self): | ||
# GH 34768 | ||
df = DataFrame({"b": [0, 1, 0], "a": [1, 2, 3]}) | ||
ax = _check_plot_works(df.plot, rot=30) | ||
ax.yaxis.set_tick_params(rotation=30) | ||
msg = "expected 0.00000 but got " | ||
with pytest.raises(AssertionError, match=msg): | ||
self._check_ticks_props(ax, xrot=0) | ||
with pytest.raises(AssertionError, match=msg): | ||
self._check_ticks_props(ax, xlabelsize=0) | ||
with pytest.raises(AssertionError, match=msg): | ||
self._check_ticks_props(ax, yrot=0) | ||
with pytest.raises(AssertionError, match=msg): | ||
self._check_ticks_props(ax, ylabelsize=0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters