bumblebee-status/tests/test_theme.py

27 lines
751 B
Python
Raw Normal View History

# pylint: disable=C0103,C0111,W0703
import unittest
from bumblebee.theme import Theme
from bumblebee.error import ThemeLoadError
class TestTheme(unittest.TestCase):
def setUp(self):
2016-12-08 10:17:25 +01:00
self.nonexistentThemeName = "no-such-theme"
self.invalidThemeName = "invalid"
def test_load_valid_theme(self):
try:
Theme("solarized-powerline")
except Exception as e:
self.fail(e)
def test_load_nonexistent_theme(self):
with self.assertRaises(ThemeLoadError):
2016-12-08 10:17:25 +01:00
Theme(self.nonexistentThemeName)
def test_load_invalid_theme(self):
with self.assertRaises(ThemeLoadError):
2016-12-08 10:17:25 +01:00
Theme(self.invalidThemeName)
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4