コード例 #1
0
ファイル: my_test.py プロジェクト: s2t2/testing-456-py
def test_enlarge(): # name this function anything, but hopefully something related to the name of the function it is testing
    result = enlarge(3)
    assert result == 300
コード例 #2
0
def test_enlarge(): # note the function name is prefixed with "test_"
    result = enlarge(3) # directly invoke the function we want to test
    assert result == 3000000 # describe expectations for desired behavior
コード例 #3
0
ファイル: my_test.py プロジェクト: dks53/testing-123
def test_enlarge():
    result = enlarge(3)
    assert result == 300
コード例 #4
0
def test_enlarge(): # note the function name is prefixed with "test_"
    result = enlarge(3) 
    assert result == 9