Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

One test function

import mymath

# We can have all the cases in one test function
def test_add_all():
    assert mymath.add(1, 1)  == 2
    assert mymath.add(2, 3)  == 5
    assert mymath.add(-1, 1)  == 0