def test_get_backed_up_files_simple(self, tmp_path: Path) -> None: # GIVEN backupdir = BackupDirectoryImpl(str(tmp_path)) backuppath = Path(backupdir.ensure_backup_destination()) backuppath.joinpath("one.txt").touch() backuppath.joinpath("subdir").mkdir() # WHEN files = backupdir.get_backed_up_files() # THEN assert files == ["one.txt", "subdir"]
def test_ensure_backup_destination(self, tmp_path: Path) -> None: backupdir = BackupDirectoryImpl(str(tmp_path)) backuppath = backupdir.ensure_backup_destination() assert os.path.exists(backuppath)