def test_add(self):
     # For this test case, I will have two asserts
     #   if one fails, then all the test case fails.
     self.assertEqual(hello.add(3,5),8)
     # This second assert will fail,
     #   because I'm saying that the resukt will be 3 when the result is 15
     #   if we change the value to 15, then it will pass
     self.assertEqual(hello.add(10,5),3)
예제 #2
0
def f():
    """ calls hello
    """
    s = hello.add(7, 2)

    logging.debug("logging sum from caller.py:" + s)
    print("printing sum from caller.py:" + s)
예제 #3
0
파일: caller.py 프로젝트: cephdon/meta-core
def f(): 
    ''' calls hello
    '''
    s=hello.add(7,2)          

    logging.debug('logging sum from caller.py:' + s)
    print 'printing sum from caller.py:', s          
예제 #4
0
def test_add():
    assert 2 == add(1, 1)
예제 #5
0
파일: test2.py 프로젝트: lingmaoer/python
import hello

a = hello.add(30, 40)
# add(100,200)      #不加模块名无法识别
print(a)

from hello import *

a = add(100, 200)  #无需模块名,可以直接引用里面的函数/类
print(a)

b = MyNum()
b.print123()
예제 #6
0
def test_add():
    assert add(4, 4) == 8
예제 #7
0
 def test_add(self):
     self.assertEqual(add(3, 4), 7)
예제 #8
0
 def test_add2(self):
     self.assertEqual(30, hello.add(10, 20))
예제 #9
0
 def test_add(self):
     self.assertEqual(hello.add(2, 4), 6)
예제 #10
0
def test_add_strings():
    result = hello.add('hello ', 'world')
    assert result == 'hello world'
    assert type(result) is str
    assert 'hello' in result
예제 #11
0
import hello

print("hi")
print(hello.add(3))
예제 #12
0
from hello import add

print(add(1, 1))
예제 #13
0
def test_add():
    assert add(10, 15) == 25
예제 #14
0
#!/usr/bin/env python3

import hello

print(hello.add(1, 2))
예제 #15
0
def test_add():

    assert add(1, 2) == 3
예제 #16
0
def test_hello_add():
    assert add(1, 2) == 3
예제 #17
0
파일: pytest.py 프로젝트: jha8/grpc
def test_add():
    a = 1
    b = 2
    c = 3
    d = hello.add(c, a)
    assert d == -1
예제 #18
0
def test_add():
    assert hello.add(3, 8) == 11
    assert hello.add(6) == 8
예제 #19
0
def test_add():
    assert add(1, 3) == 4
    assert add(2, 3) == 5
예제 #20
0
 def test_add(self):
     self.assertEqual(5, hello.add(2, 3))
예제 #21
0
파일: index.py 프로젝트: AC740/Py

import hello

hello.add(7,8)
예제 #22
0
def test_add():
    assert hello.add(1,2) == 3
예제 #23
0
def test_add():
    assert 5 + 5 == hello.add(5, 5)
예제 #24
0
from hello import add

assert add(0, 0) == 0
assert add(12, 12) == 24
assert add(-12, 12) == 0
assert add(12, -2) == 10
assert add(-12, -2) == -14
예제 #25
0
def test_add():
	assert add(2,3)==3
예제 #26
0
def test_hello_add():
    assert add(test_hello_add.x) == 11
예제 #27
0
def test_add():
    assert add(1, 2) == 3
    assert add(3, 2) == 5
    assert add(0, 0) == 0
예제 #28
0
def test_add():
    assert 9 == add(4, 5)
예제 #29
0
def test_add():
    assert 3 == add(1, 2)