Exemplo n.º 1
0
def test_set_load_version_valid(version, version_file_path):
    set_version(version, version_file_path)
    assert load_version(version_file_path) == PlenumVersion(version)
Exemplo n.º 2
0
def test_load_version_invalid(version, version_file_path):
    with open(version_file_path, 'w') as _f:
        json.dump(version, _f)
    with pytest.raises(InvalidVersionError):
        load_version(version_file_path)