summaryrefslogtreecommitdiff
path: root/subdir
diff options
context:
space:
mode:
Diffstat (limited to 'subdir')
-rw-r--r--subdir/foo.py9
-rw-r--r--subdir/foo_tests.py11
2 files changed, 20 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)