summaryrefslogtreecommitdiff
path: root/tests/test_sequences.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_sequences.py')
-rwxr-xr-xtests/test_sequences.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_sequences.py b/tests/test_sequences.py
index a1ea10c..a5c9d07 100755
--- a/tests/test_sequences.py
+++ b/tests/test_sequences.py
@@ -1,5 +1,7 @@
"""Test sequence functions."""
import unittest
+import unittest.mock
+import io
from pywal import sequences
from pywal import util
@@ -22,6 +24,13 @@ class Testsequences(unittest.TestCase):
result = sequences.set_color(11, COLORS["colors"]["color0"])
self.assertEqual(result, "\033]4;11;#1F211E\007")
+ def test_send_srquences(self):
+ """> Send sequences to all open terminals."""
+ with unittest.mock.patch('sys.stdout', new=io.StringIO()) as fake_out:
+ sequences.send(COLORS, False)
+ self.assertEqual(fake_out.getvalue().strip(),
+ "colors: Set terminal colors")
+
if __name__ == "__main__":
unittest.main()