From: karim hamidou Date: Wed, 4 Jul 2012 07:46:16 +0000 (+0200) Subject: added code to run unit tests X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=7e8823be283a60f3b97bd09c58fd5ae8c5fbeea3;p=cagibi.git added code to run unit tests --- diff --git a/cagibi/runtests.py b/cagibi/runtests.py new file mode 100644 index 0000000..9abcec6 --- /dev/null +++ b/cagibi/runtests.py @@ -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 index 0000000..a1489e0 --- /dev/null +++ b/cagibi/tests/test_watch.py @@ -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 +