From 855ab6011ff30ed34b43e89993a285b64849e183 Mon Sep 17 00:00:00 2001 From: Sassan Haradji Date: Sat, 23 Mar 2024 22:04:31 +0400 Subject: [PATCH] fix: initial snapshot cleanup which used to mistakenly remove files with store:... filenames now removes files with store-... filenames --- CHANGELOG.md | 5 +++++ pyproject.toml | 2 +- redux_pytest/fixtures/snapshot.py | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 553d7c5..6641d45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## Version 0.13.2 + +- fix: initial snapshot cleanup which used to mistakenly remove files with store:... + filenames now removes files with store-... filenames + ## Version 0.13.1 - chore: changed the format of snapshot filenames from store:... to store-... diff --git a/pyproject.toml b/pyproject.toml index 31ec3fb..2f9602f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "python-redux" -version = "0.13.1" +version = "0.13.2" description = "Redux implementation for Python" authors = ["Sassan Haradji "] license = "Apache-2.0" diff --git a/redux_pytest/fixtures/snapshot.py b/redux_pytest/fixtures/snapshot.py index da6e3b8..f33d7ed 100644 --- a/redux_pytest/fixtures/snapshot.py +++ b/redux_pytest/fixtures/snapshot.py @@ -39,7 +39,7 @@ def __init__( self.results_dir = path.parent / 'results' / file / test_id.split('::')[-1][5:] if self.results_dir.exists(): for file in self.results_dir.glob( - 'store:*' if override else 'store:*.mismatch.json', + 'store-*' if override else 'store-*.mismatch.json', ): file.unlink() # pragma: no cover self.results_dir.mkdir(parents=True, exist_ok=True)