[tests/theme] Refactor

This commit is contained in:
Tobi-wan Kenobi 2016-12-08 10:17:25 +01:00
parent 2399cf9af1
commit e6666becb3

View file

@ -6,7 +6,8 @@ from bumblebee.error import ThemeLoadError
class TestTheme(unittest.TestCase): class TestTheme(unittest.TestCase):
def setUp(self): def setUp(self):
pass self.nonexistentThemeName = "no-such-theme"
self.invalidThemeName = "invalid"
def test_load_valid_theme(self): def test_load_valid_theme(self):
try: try:
@ -16,10 +17,10 @@ class TestTheme(unittest.TestCase):
def test_load_nonexistent_theme(self): def test_load_nonexistent_theme(self):
with self.assertRaises(ThemeLoadError): with self.assertRaises(ThemeLoadError):
Theme("no-such-theme") Theme(self.nonexistentThemeName)
def test_load_invalid_theme(self): def test_load_invalid_theme(self):
with self.assertRaises(ThemeLoadError): with self.assertRaises(ThemeLoadError):
Theme("invalid") Theme(self.invalidThemeName)
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4