Exemple #1
0
def test_square_string_fails():
    with pytest.raises(TypeError):
        assert square("hello") == "?"
Exemple #2
0
def test_square():
    assert square(0) == 0
    assert square(1) == 1
    assert square(-1) == 1