summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/test_colors.py5
-rw-r--r--tests/test_files/test_file.json1
-rwxr-xr-xtests/test_sequences.py4
3 files changed, 8 insertions, 2 deletions
diff --git a/tests/test_colors.py b/tests/test_colors.py
index 5efafa0..a3b939c 100755
--- a/tests/test_colors.py
+++ b/tests/test_colors.py
@@ -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()
diff --git a/tests/test_files/test_file.json b/tests/test_files/test_file.json
index c555eda..fcb5f40 100644
--- a/tests/test_files/test_file.json
+++ b/tests/test_files/test_file.json
@@ -1,5 +1,6 @@
{
"wallpaper": "5.png",
+ "alpha": "100",
"special": {
"background": "#1F211E",
diff --git a/tests/test_sequences.py b/tests/test_sequences.py
index 8e4dc74..f5680eb 100755
--- a/tests/test_sequences.py
+++ b/tests/test_sequences.py
@@ -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":