import pytest from calc import calc def test_add(): assert calc(2, "+", 3) == 5 def test_divide(): assert calc(6, "/", 2) == 3.0 def test_divide_float(): assert calc(7, "/", 2) == 3.5 def test_unknown(): with pytest.raises(ValueError): calc(1, "%", 2)