コード例 #1
0
ファイル: test_yaml_local.py プロジェクト: zach-data/kedro
    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)
コード例 #2
0
ファイル: test_yaml_local.py プロジェクト: zach-data/kedro
def versioned_yaml_data_set(filepath_yaml, load_version, save_version):
    return YAMLLocalDataSet(filepath=filepath_yaml,
                            version=Version(load_version, save_version))
コード例 #3
0
ファイル: test_yaml_local.py プロジェクト: zach-data/kedro
def yaml_data_set(filepath_yaml):
    return YAMLLocalDataSet(filepath=filepath_yaml)