def test_power(data, expected): result = power(*data) if isinstance(result, str): assert result == expected else: assert result == pytest.approx(expected, rel=1e-3)