"""Tests for math utilities."""
import pytest
from src.math_utils import add, multiply


def test_add():
    assert add(2, 3) == 5
    assert add(0, 0) == 0
    assert add(-1, 1) == 0


def test_multiply():
    assert multiply(2, 3) == 6
    assert multiply(0, 5) == 0
    assert multiply(-2, 3) == -6


# Tests for factorial will be added when the function exists
def test_factorial():
    """Test factorial function once implemented."""
    try:
        from src.math_utils import factorial
    except ImportError:
        pytest.skip("factorial not implemented yet")

    assert factorial(0) == 1
    assert factorial(1) == 1
    assert factorial(5) == 120
    assert factorial(10) == 3628800

    with pytest.raises(ValueError):
        factorial(-1)
