예제 #1
0
def test_parameters(test_parameters):

    dataset = Dataset(test_parameters[0], load=False)
    dataset.load_parameters()

    for jcampdx in dataset._parameters.values():
        with Path(str(jcampdx.path)+'.json').open() as file:
            reference = json.load(file)

        assert jcampdx.to_dict() == reference
예제 #2
0
def test_properties(test_properties):
    if test_properties:
        dataset = Dataset(test_properties[0], load=False, parameter_files=['subject'])
        dataset.load_parameters()
        dataset.load_properties()
        assert dataset.to_dict() == test_properties[1]