Exemple #1
0
def test_old_regenerated_handles_unknown_options(tmp_cfg, tmp_dir):
    write_pkg_version(tmp_cfg, tmp_dir)
    ver = load_pkg_version(tmp_dir)
    del ver['base']
    json.dump(ver, open(pj(tmp_dir, pkglts_dir, pkg_version_file), 'w'))

    assert 'base' not in outdated_options(tmp_cfg, tmp_dir)
Exemple #2
0
def test_old_regenerated_package_have_outdated_options(tmp_cfg, tmp_dir):
    write_pkg_version(tmp_cfg, tmp_dir)
    ver = load_pkg_version(tmp_dir)
    ver['base'] = semver.bump_major(ver['base'])
    json.dump(ver, open(pj(tmp_dir, pkglts_dir, pkg_version_file), 'w'))

    assert 'base' in outdated_options(tmp_cfg, tmp_dir)
def test_old_regenerated_package_have_outdated_options(tmp_cfg, tmp_dir):
    write_pkg_version(tmp_cfg, tmp_dir)
    ver = load_pkg_version(tmp_dir)
    ver['base'] = str(semver.VersionInfo.parse(ver['base']).bump_major())
    json.dump(ver, open(tmp_dir / pkglts_dir / pkg_version_file, 'w'))

    assert 'base' in outdated_options(tmp_cfg, tmp_dir)
Exemple #4
0
def test_outdated_options_handles_no_version_file(tmp_cfg, tmp_dir):
    assert len(outdated_options(tmp_cfg, tmp_dir)) == 0
Exemple #5
0
def test_freshly_regenerated_package_have_not_outdated_options(
        tmp_cfg, tmp_dir):
    write_pkg_version(tmp_cfg, tmp_dir)

    assert len(outdated_options(tmp_cfg, tmp_dir)) == 0