Beispiel #1
0
def test_size_minus_14_not_valid():
    with pytest.raises(Exception) as e:
        size(-14)
        print(e)
    assert "Invalid pixel" in str(e)
Beispiel #2
0
def test_size_million_not_valid():
    with pytest.raises(Exception) as e:
        size(1e6)
    assert "Invalid pixel" in str(e)
Beispiel #3
0
def test_size_asdf_gives_ValueError():
    with pytest.raises(Exception) as e:
        size("asdf")
    assert "Error" in str(e)
Beispiel #4
0
def test_size_140_is_valid():
    assert size(140) == 140