Esempio n. 1
0
def test_error():
    """
    you should get an TypeError if you try to add something other than numbers
    """
    try:
        print cy_add.add('this', 5)
        assert False # shouldn't get here!
    except TypeError:
        # should have gotten an exception
        pass
Esempio n. 2
0
def test_error():
    """
    you should get an TypeError if you try to add something other than numbers
    """
    try:
        print cy_add.add('this', 5)
        assert False  # shouldn't get here!
    except TypeError:
        # should have gotten an exception
        pass
Esempio n. 3
0
def test_float():
    cy_add.add(3.3, 6.8) == 9
Esempio n. 4
0
def test_2():
    assert cy_add.add(5, 6) == 11
Esempio n. 5
0
def test_1():
    assert cy_add.add(3, 4) == 7
Esempio n. 6
0
def test_float():
    cy_add.add(3.3, 6.8) == 9
Esempio n. 7
0
def test_2():
    assert cy_add.add(5, 6) == 11
Esempio n. 8
0
def test_1():
    assert cy_add.add(3, 4) == 7
def test_float():
    assert cy_add.add(1.1, 2.2) == 3.3
def test_float():
    assert cy_add.add(1.1, 2.2) == 3.3