示例#1
0
 def test_func(self):
     x = hello.sum(1, 2)
     self.assertEqual(x, 3)
示例#2
0
 def test_func(self):
     x = hello.sum(1, 2)
     self.assertEqual(x, 3)
示例#3
0
import hello  #imports everything from hello.py file
#from hello import sum

print hello.sum(1, 78)
print dir(hello)
示例#4
0
文件: test.py 项目: pypingou/c_python
 def test_hello_sum(self):
     """ Test the sum function. """
     self.assertEqual(hello.sum([1, 2, 3, 4]), 10)