]> khamidou — GitHub mirrors - cagibi.git/commitdiff
added code to run unit tests
authorkarim hamidou <khamidou@gmail.com>
Wed, 4 Jul 2012 07:46:16 +0000 (09:46 +0200)
committerkarim hamidou <khamidou@gmail.com>
Wed, 4 Jul 2012 07:46:16 +0000 (09:46 +0200)
cagibi/runtests.py [new file with mode: 0644]
cagibi/tests/test_watch.py [new file with mode: 0644]

diff --git a/cagibi/runtests.py b/cagibi/runtests.py
new file mode 100644 (file)
index 0000000..9abcec6
--- /dev/null
@@ -0,0 +1,5 @@
+import unittest
+ 
+if __name__ == "__main__":
+    all_tests = unittest.TestLoader().discover('tests', pattern='*.py')
+    unittest.TextTestRunner().run(all_tests)
diff --git a/cagibi/tests/test_watch.py b/cagibi/tests/test_watch.py
new file mode 100644 (file)
index 0000000..a1489e0
--- /dev/null
@@ -0,0 +1,14 @@
+import unittest
+import watch
+
+class FileWatcherTestCase(unittest.TestCase):
+        def setUp(self):
+            self.watcher = watch.FileWatcher()
+            self.counter = 0
+
+        def test_hop(self):
+            self.assertTrue(True)
+
+        def handler(self):
+            count += 1
+