Example #1
0
def test_scale_invlid():
    with pytest.raises(ValueError) as exc:
        print(parse_scale('foo:bar'))
    assert str(exc.value) == 'Invalid scale "foo:bar".'
Example #2
0
def test_scale():
    assert parse_scale('foo:2') == ('foo', 2)