Esempio n. 1
0
def test_power_type_error():
    a = Rational(17, 23)
    with pytest.raises(TypeError):
        a.power(4.3)
Esempio n. 2
0
def test_power_square():
    a = Rational(17, 23)
    assert str(a.square()) == str(a.power(2))