Пример #1
0
def test_write_new_changes(datalad_store, new_dataset):
    ds_id = os.path.basename(new_dataset.path)
    write_new_changes(new_dataset, '1.0.1', ['Some changes'], '2019-01-01')
    # Manually make the commit without validation
    new_dataset.save('CHANGES')
    # Get a fresh dataset object and verify correct CHANGES
    dataset = Dataset(os.path.join(datalad_store.annex_path, ds_id))
    assert not dataset.repo.dirty
    assert git_show(dataset.path, 'HEAD:CHANGES') == '''1.0.1 2019-01-01
Пример #2
0
def test_write_new_changes(celery_app, annex_path, new_dataset):
    ds_id = os.path.basename(new_dataset.path)
    write_new_changes(new_dataset, '1.0.1', ['Some changes'], '2019-01-01')
    # Manually make the commit without validation
    new_dataset.add('CHANGES')
    # Get a fresh dataset object and verify correct CHANGES
    dataset = Dataset(str(annex_path.join(ds_id)))
    assert not dataset.repo.is_dirty()
    assert dataset.repo.repo.git.show('HEAD:CHANGES') == '''1.0.1 2019-01-01