From 7e8823be283a60f3b97bd09c58fd5ae8c5fbeea3 Mon Sep 17 00:00:00 2001 From: karim hamidou Date: Wed, 4 Jul 2012 09:46:16 +0200 Subject: [PATCH] added code to run unit tests --- cagibi/runtests.py | 5 +++++ cagibi/tests/test_watch.py | 14 ++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 cagibi/runtests.py create mode 100644 cagibi/tests/test_watch.py 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 + -- 2.43.0