Skip to content

Commit 73f74f6

Browse files
committed
Added a test for foo
1 parent 735a146 commit 73f74f6

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

src/demo/test/foo_test.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
'''
2+
Created on 25 Mar 2015
3+
4+
@author: ssg37927
5+
'''
6+
import unittest
7+
8+
9+
class Test(unittest.TestCase):
10+
11+
def testadd(self):
12+
from demo import foo
13+
self.assertEqual(foo.add(1, 2), 3)
14+
15+
def testsub(self):
16+
from demo import foo
17+
self.assertEqual(foo.sub(5, 2), 3)
18+
19+
def testmul(self):
20+
from demo import foo
21+
self.assertEqual(foo.mul(1, 2), 2)
22+
23+
def testdiv(self):
24+
from demo import foo
25+
self.assertEqual(foo.div(10, 2), 5)
26+
27+
28+
if __name__ == "__main__":
29+
unittest.main()

0 commit comments

Comments
 (0)