Example #1
0
def test_last_data_set_from_experiment(dataset):
    experiment = load_experiment(dataset.exp_id)
    ds = experiment.last_data_set()

    assert dataset.run_id == ds.run_id
    assert dataset.name == ds.name
    assert dataset.exp_id == ds.exp_id
    assert dataset.exp_name == ds.exp_name
    assert dataset.sample_name == ds.sample_name
    assert dataset.path_to_db == ds.path_to_db

    assert experiment.path_to_db == ds.path_to_db
Example #2
0
def test_last_data_set_from_experiment_with_no_datasets(experiment):
    with pytest.raises(ValueError,
                       match='There are no runs in this '
                       'experiment'):
        _ = experiment.last_data_set()