Skip to content

Commit bb58289

Browse files
committed
Jinja2 is optional, so Styler is maybe not there
1 parent 5bff74f commit bb58289

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

pandas/tests/api/test_api.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class TestPDApi(Base, tm.TestCase):
2727

2828
# these are optionally imported based on testing
2929
# & need to be ignored
30-
ignored = ['tests', 'locale', 'conftest']
30+
ignored = ['tests', 'locale', 'conftest', 'Styler']
3131

3232
# top-level sub-packages
3333
lib = ['api', 'compat', 'computation', 'core',
@@ -117,6 +117,10 @@ def test_api(self):
117117
self.deprecated_funcs,
118118
self.ignored)
119119

120+
def test_styler(self):
121+
pytest.importorskip('jinja2')
122+
from pandas.io.api import Styler # noqa
123+
120124

121125
class TestApi(Base, tm.TestCase):
122126

@@ -127,12 +131,6 @@ def test_api(self):
127131
self.check(api, self.allowed)
128132

129133

130-
class TestApiIO(Base, tm.TestCase):
131-
132-
def test_api(self):
133-
self.check(api.io, self.allowed)
134-
135-
136134
class TestDatetoolsDeprecation(tm.TestCase):
137135

138136
def test_deprecation_access_func(self):

0 commit comments

Comments
 (0)