diff options
-rw-r--r-- | subdir/foo.py | 9 | ||||
-rw-r--r-- | subdir/foo_tests.py | 11 | ||||
-rw-r--r-- | testrun.py | 5 |
3 files changed, 25 insertions, 0 deletions
diff --git a/subdir/foo.py b/subdir/foo.py new file mode 100644 index 0000000..9059213 --- /dev/null +++ b/subdir/foo.py @@ -0,0 +1,9 @@ +class Foo: + + def foo(self, a): + if a: + return True + else: + return False + +
\ No newline at end of file diff --git a/subdir/foo_tests.py b/subdir/foo_tests.py new file mode 100644 index 0000000..a8a9740 --- /dev/null +++ b/subdir/foo_tests.py @@ -0,0 +1,11 @@ +import unittest, foo + +class FooTests(unittest.TestCase): + + def testTrue(self): + f = foo.Foo() + self.failUnlessEqual(f.foo(True), True) + + def testFalse(self): + f = foo.Foo() + self.failUnlessEqual(f.foo(False), False) diff --git a/testrun.py b/testrun.py new file mode 100644 index 0000000..09fb93e --- /dev/null +++ b/testrun.py @@ -0,0 +1,5 @@ +from CoverageTestRunner import CoverageTestRunner + +r = CoverageTestRunner() +r.find_pairs(".") +r.run() |