Exemplo n.º 1
0
    def test_version_str_repr(self, load_version, save_version):
        """Test that version is in string representation of the class instance
        when applicable."""
        filepath = "test.yaml"
        ds = YAMLLocalDataSet(filepath=filepath)
        ds_versioned = YAMLLocalDataSet(filepath=filepath,
                                        version=Version(
                                            load_version, save_version))
        assert filepath in str(ds)
        assert "version" not in str(ds)

        assert filepath in str(ds_versioned)
        ver_str = "version=Version(load={}, save='{}')".format(
            load_version, save_version)
        assert ver_str in str(ds_versioned)
Exemplo n.º 2
0
def versioned_yaml_data_set(filepath_yaml, load_version, save_version):
    return YAMLLocalDataSet(filepath=filepath_yaml,
                            version=Version(load_version, save_version))
Exemplo n.º 3
0
def yaml_data_set(filepath_yaml):
    return YAMLLocalDataSet(filepath=filepath_yaml)