skip tests if no themes are present

This commit is contained in:
Matthias 2022-05-19 00:14:20 +02:00
parent c0ef12f270
commit 5ab4fdeb84
No known key found for this signature in database
GPG Key ID: AB6D0E6C4CB65093

View File

@ -682,9 +682,19 @@ class ColorThemeTest(TestCase):
def test_choices(self):
result = ColorTheme.get_color_themes_choices()
# skip if no themes present
if not result:
return
self.assertIn(('default', 'Default'), result)
def test_valid_choice(self):
result = ColorTheme.get_color_themes_choices()
# skip if no themes present
if not result:
return
# check wrong reference
self.assertFalse(ColorTheme.is_valid_choice('abcdd'))