Skip to content

Commit

Permalink
theme: Delete old themes.
Browse files Browse the repository at this point in the history
Old theme format used in themes.py is deleted from this commit.

ZT_THEMES is changed to THEMES. `complete_and_incomplete_themes` is
edited to make it use the new THEMES instead of the old one.
  • Loading branch information
Rohitth007 committed Jun 12, 2021
1 parent d386ab6 commit 4dc9bdf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 490 deletions.
31 changes: 0 additions & 31 deletions tests/config/test_themes.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,37 +40,6 @@ def test_builtin_theme_completeness(theme_name):
assert all(required_style in styles_in_theme for required_style in REQUIRED_STYLES)


@pytest.mark.parametrize(
"theme_name, depth",
[
("zt_dark", 16),
("zt_dark", 256),
("zt_light", 16),
("zt_blue", 16),
("gruvbox_dark", 16),
("gruvbox_dark", 256),
("gruvbox_dark24", 2 ** 24),
("gruvbox_dark24", 2 ** 24),
],
)
def test_migrated_themes(theme_name, depth):
def split_and_strip(style):
style = style.split(",")
style = [s.strip() for s in style]
return style

old_theme = THEMES[theme_name]
new_theme = generate_theme(theme_name.replace("24", ""), depth)
for new_style, old_style in zip(new_theme, old_theme):
assert new_style[0] == old_style[0]
if depth == 16:
assert split_and_strip(new_style[1]) == split_and_strip(old_style[1])
assert split_and_strip(new_style[2]) == split_and_strip(old_style[2])
else:
assert split_and_strip(new_style[4]) == split_and_strip(old_style[4])
assert split_and_strip(new_style[5]) == split_and_strip(old_style[5])


def test_complete_and_incomplete_themes():
# These are sorted to ensure reproducibility
result = (
Expand Down
Loading

0 comments on commit 4dc9bdf

Please sign in to comment.