[core/themes] Add theme loading
Load a theme from a JSON file.
This commit is contained in:
parent
c44744fa50
commit
2399cf9af1
4 changed files with 52 additions and 2 deletions
|
@ -1,3 +1,25 @@
|
|||
# pylint: disable=C0103,C0111
|
||||
# pylint: disable=C0103,C0111,W0703
|
||||
|
||||
import unittest
|
||||
from bumblebee.theme import Theme
|
||||
from bumblebee.error import ThemeLoadError
|
||||
|
||||
class TestTheme(unittest.TestCase):
|
||||
def setUp(self):
|
||||
pass
|
||||
|
||||
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):
|
||||
Theme("no-such-theme")
|
||||
|
||||
def test_load_invalid_theme(self):
|
||||
with self.assertRaises(ThemeLoadError):
|
||||
Theme("invalid")
|
||||
|
||||
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue