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

Solution: test simple module

import math

def test_comb():
    assert math.comb(10, 3) == 120;


def test_factorial():
    assert math.factorial(10) == 3628800;

def test_gcd():
    assert math.gcd(100, 60, 130) == 10;
pytest test_math.py