diff tests/test_waiter.py @ 18:56596902e9ae default tip

add some setup + tests
author Jeff Hammel <k0scist@gmail.com>
date Sun, 10 Dec 2017 17:57:03 -0800
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test_waiter.py	Sun Dec 10 17:57:03 2017 -0800
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+
+"""
+test bash waiting function
+"""
+
+import os
+import shutil
+import tempfile
+import unittest
+from lemuriformes import waiter
+
+string = (str, unicode)
+
+
+class TestWaiter(unittest.TestCase):
+
+    def test_render(self):
+        commands = ['echo {}'.format(item)
+                    for item in ('hello', 'world')]
+        hello = str(waiter.BashWaiter(*commands))
+        assert isinstance(hello, string)
+
+
+if __name__ == '__main__':
+    unittest.main()