mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-01-22 05:48:53 +01:00
tests: Test json file with no wallpaper.
This commit is contained in:
parent
06d993bc06
commit
0ccc55ffdd
@ -40,6 +40,11 @@ class TestGenColors(unittest.TestCase):
|
|||||||
result = colors.file("tests/test_files/test_file.json")
|
result = colors.file("tests/test_files/test_file.json")
|
||||||
self.assertEqual(result["colors"]["color0"], "#1F211E")
|
self.assertEqual(result["colors"]["color0"], "#1F211E")
|
||||||
|
|
||||||
|
def test_color_import_no_wallpaper(self):
|
||||||
|
"""> Read colors from a file without a wallpaper."""
|
||||||
|
result = colors.file("tests/test_files/test_file2.json")
|
||||||
|
self.assertEqual(result["wallpaper"], "None")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
25
tests/test_files/test_file2.json
Normal file
25
tests/test_files/test_file2.json
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"special": {
|
||||||
|
"background": "#1F211E",
|
||||||
|
"foreground": "#F5F1F4",
|
||||||
|
"cursor": "#F5F1F4"
|
||||||
|
},
|
||||||
|
"colors": {
|
||||||
|
"color0": "#1F211E",
|
||||||
|
"color1": "#4B7A85",
|
||||||
|
"color2": "#CC6A93",
|
||||||
|
"color3": "#5C9894",
|
||||||
|
"color4": "#A0A89B",
|
||||||
|
"color5": "#D1B9A9",
|
||||||
|
"color6": "#E3D6D8",
|
||||||
|
"color7": "#F5F1F4",
|
||||||
|
"color8": "#666666",
|
||||||
|
"color9": "#4B7A85",
|
||||||
|
"color10": "#CC6A93",
|
||||||
|
"color11": "#5C9894",
|
||||||
|
"color12": "#A0A89B",
|
||||||
|
"color13": "#D1B9A9",
|
||||||
|
"color14": "#E3D6D8",
|
||||||
|
"color15": "#F5F1F4"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user