mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-06-13 21:27:08 +02:00
tests: Fix tests
This commit is contained in:
parent
7566104c85
commit
bd5611e35c
@ -21,10 +21,10 @@ class TestExportColors(unittest.TestCase):
|
|||||||
"""> Test substitutions in template file."""
|
"""> Test substitutions in template file."""
|
||||||
template.export_all(COLORS, OUTPUT_DIR)
|
template.export_all(COLORS, OUTPUT_DIR)
|
||||||
|
|
||||||
result = pathlib.Path("/tmp/colors.sh").is_file()
|
result = pathlib.Path("/tmp/wal/colors.sh").is_file()
|
||||||
self.assertTrue(result)
|
self.assertTrue(result)
|
||||||
|
|
||||||
content = pathlib.Path("/tmp/colors.sh").read_text()
|
content = pathlib.Path("/tmp/wal/colors.sh").read_text()
|
||||||
content = content.split("\n")[6]
|
content = content.split("\n")[6]
|
||||||
self.assertEqual(content, "foreground='#F5F1F4'")
|
self.assertEqual(content, "foreground='#F5F1F4'")
|
||||||
|
|
||||||
@ -32,10 +32,10 @@ class TestExportColors(unittest.TestCase):
|
|||||||
"""> Test substitutions in template file (css)."""
|
"""> Test substitutions in template file (css)."""
|
||||||
template.export(COLORS, "colors.css", OUTPUT_DIR)
|
template.export(COLORS, "colors.css", OUTPUT_DIR)
|
||||||
|
|
||||||
result = pathlib.Path("/tmp/colors.css").is_file()
|
result = pathlib.Path("/tmp/wal/colors.css").is_file()
|
||||||
self.assertTrue(result)
|
self.assertTrue(result)
|
||||||
|
|
||||||
content = pathlib.Path("/tmp/colors.css").read_text()
|
content = pathlib.Path("/tmp/wal/colors.css").read_text()
|
||||||
content = content.split("\n")[6]
|
content = content.split("\n")[6]
|
||||||
self.assertEqual(content, " --background: #1F211E;")
|
self.assertEqual(content, " --background: #1F211E;")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user