Skip to content

Commit

Permalink
travis: alter theme_xkcd test due to missing fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
has2k1 committed Apr 25, 2017
1 parent 3a68421 commit 383e185
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion plotnine/tests/test_theme.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import os

from plotnine import ggplot, aes, geom_point, labs, facet_grid
from plotnine import (theme, theme_538, theme_bw, theme_classic,
theme_dark, theme_gray, theme_light,
Expand Down Expand Up @@ -154,4 +156,9 @@ def test_theme_void(self):
def test_theme_xkcd(self):
p = self.g + labs(title='Theme Xkcd') + theme_xkcd()

assert p + _theme == 'theme_xkcd'
if os.environ.get('TRAVIS'):
# Travis does not have the fonts, we still check
# to catch any other errors
assert p + _theme != 'theme_gray'
else:
assert p + _theme == 'theme_xkcd'

0 comments on commit 383e185

Please sign in to comment.