コード例 #1
0
 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
ファイル: test_hello.py プロジェクト: bryanmwaniqi/crudapp
 def test_add(self):
     self.assertEqual(add(3, 4), 7)
コード例 #8
0
ファイル: hello_test.py プロジェクト: jinkerry/unit_test
 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
ファイル: temp.py プロジェクト: gabrielarpino/Python-Labs
import hello

print("hi")
print(hello.add(3))
コード例 #12
0
ファイル: sample.py プロジェクト: kazu228/playinpython
from hello import add

print(add(1, 1))
コード例 #13
0
def test_add():
    assert add(10, 15) == 25
コード例 #14
0
ファイル: test.py プロジェクト: csu-fangjun/Programming-Notes
#!/usr/bin/env python3

import hello

print(hello.add(1, 2))
コード例 #15
0
ファイル: test_hello.py プロジェクト: Klalena/scaffold
def test_add():

    assert add(1, 2) == 3
コード例 #16
0
ファイル: test_hello.py プロジェクト: sisionion/scoffold
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
ファイル: hello_test.py プロジェクト: jinkerry/unit_test
 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
ファイル: tests.py プロジェクト: tirkarthi/amazon-test
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
ファイル: test_hello.py プロジェクト: Klalena/azure_hello
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)