mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-02-16 18:20:53 +01:00
tests: Update tests.
This commit is contained in:
parent
0a71cb7b2b
commit
2601caead6
@ -114,6 +114,6 @@ def file(input_file):
|
||||
data["wallpaper"] = "None"
|
||||
|
||||
if "alpha" not in data:
|
||||
data["alpha"] = 100
|
||||
data["alpha"] = "100"
|
||||
|
||||
return data
|
||||
|
@ -27,6 +27,11 @@ class TestGenColors(unittest.TestCase):
|
||||
result = colors.file("tests/test_files/test_file2.json")
|
||||
self.assertEqual(result["wallpaper"], "None")
|
||||
|
||||
def test_color_import_no_alpha(self):
|
||||
"""> Read colors from a file without an alpha."""
|
||||
result = colors.file("tests/test_files/test_file2.json")
|
||||
self.assertEqual(result["alpha"], "100")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
"wallpaper": "5.png",
|
||||
"alpha": "100",
|
||||
|
||||
"special": {
|
||||
"background": "#1F211E",
|
||||
|
@ -14,7 +14,7 @@ class Testsequences(unittest.TestCase):
|
||||
|
||||
def test_set_special(self):
|
||||
"""> Create special escape sequence."""
|
||||
util.Color.alpha_num = 100
|
||||
util.Color.alpha_num = "100"
|
||||
result = sequences.set_special(11, COLORS["special"]["background"])
|
||||
|
||||
if platform.uname()[0] == "Darwin":
|
||||
@ -24,7 +24,7 @@ class Testsequences(unittest.TestCase):
|
||||
|
||||
def test_set_special_alpha(self):
|
||||
"""> Create special escape sequence with alpha."""
|
||||
util.Color.alpha_num = 99
|
||||
util.Color.alpha_num = "99"
|
||||
result = sequences.set_special(11, COLORS["special"]["background"])
|
||||
|
||||
if platform.uname()[0] == "Darwin":
|
||||
|
Loading…
Reference in New Issue
Block a user