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.txt" ds = TextLocalDataSet(filepath=filepath) ds_versioned = TextLocalDataSet(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)
def txt_data_set_with_args(filepath_txt, request): return TextLocalDataSet( filepath=filepath_txt, load_args={"errors": "ignore"}, save_args={"errors": "ignore"}, **request.param )
def versioned_txt_data_set(filepath_txt, load_version, save_version): return TextLocalDataSet( filepath=filepath_txt, version=Version(load_version, save_version) )
def txt_data_set(filepath_txt, request): return TextLocalDataSet(filepath=filepath_txt, **request.param)
def test_filepath_expanduser(self): txt_dataset = TextLocalDataSet(filepath="~") assert "~" not in str(txt_dataset._filepath) # pylint: disable=protected-access
def test_filepath_expanduser(self): txt_dataset = TextLocalDataSet(filepath="~") assert "~" not in str(txt_dataset._filepath)