You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All notable changes to this project will be documented in this file.
3
-
## [0.2.1]
3
+
4
+
*NOTE:* Version 0.X.X might have breaking changes in bumps of the minor version number. This is because the project is still in early development and the API is not yet stable. It will still be marked clearly in the release notes.
5
+
6
+
## [0.3.0]
7
+
- Add snappylapy parametization functionality to snappylapy and allow it to be loaded in the load_snapshot fixture
8
+
- Do reporting showing count of updated, created and deleted snapshots
9
+
-**Breaking Changes**
10
+
- Change setting of path to only have a single path configurable and update such it is configured through the marker
11
+
- Make the folder names of __snapshots__ and __test_results__ enforced to be fixed (needed for cleanup and diffing)
12
+
- Rename output file names of snapshots to match [filename][testname][name].extention conversion
13
+
14
+
## [0.2.1] - 13-01-2025
4
15
- Added missing dependency for typer to make the CLI work
5
16
6
-
## [0.2.0]
17
+
## [0.2.0] - 13-01-2025
7
18
- Better error messages by using pytest assertion rewriting
8
19
- Allow users to set the snapshot directory when using the load_snapshot fixture
9
20
- Add CLI for for init and clear commands
10
21
- Added automated generation of documentation using mkdocs
11
22
12
-
## [0.1.1]
23
+
## [0.1.1] - 10-01-2025
13
24
- Update dependencies with the lower bounds of package compatibility
14
25
- Refactor to make code easier for users of package to modify and extend
15
26
16
-
## [0.1.0]
27
+
## [0.1.0] - 08-01-2025
17
28
- Added fixture for loading snapshots from previous tests (load_snapshot fixture)
18
29
- Added the snappylapy marker for tests that depend on previous tests (pytest.mark.snappylapy). This will be used for more advanced features in the future.
19
30
20
-
## [0.0.2]
31
+
## [0.0.2] - 07-01-2025
21
32
- 🐞 Added fix for python 3.9, by refactoring incompatible type annotation
22
33
- Loosened the version requirements for pytest (until the lower bound have been discovered, with automated testing)
23
34
- Improved metadata for pypi
24
35
25
-
## [0.0.1]
36
+
## [0.0.1] - 06-01-2025
26
37
- Initial release of Snappylapy
27
38
- Implemented basic snapshot testing functionality for dict, list, bytes and str data types
Copy file name to clipboardExpand all lines: README.md
+1-33Lines changed: 1 addition & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
Welcome to **Snappylapy**, a powerful and intuitive snapshot testing tool for Python's pytest framework. Snappylapy simplifies the process of capturing and verifying snapshots of your data, ensuring your code behaves as expected across different runs. With Snappylapy, you can save snapshots in a human-readable format and deserialize them for robust integration testing, providing a clear separation layer to help isolate errors and maintain code integrity.
4
4
5
5
## Installation
6
-
To install Snappylapy, use the following command:
6
+
To get started with Snappylapy, install the package via pip:
In this example, `snappylapy` captures the output of `my_function` and compares it against a stored snapshot. If the output changes unexpectedly, pytest will flag the test, allowing you to review the differences and ensure your code behaves as expected.
69
53
70
54
Snappylapy can use the snapshots created for inputs in another test. You can think of it as automated/easier mock data generation and management.
This can be great for external dependencies, for example an AI service, that might change response over time. With this approach we can isolate the changes to the service and still make succeding tests pass.
90
74
91
-
## Getting Started
92
-
93
-
To get started with Snappylapy, install the package via pip:
94
-
95
-
```bash
96
-
pip install snappylapy
97
-
```
98
-
99
-
Add Snappylapy to your pytest configuration and start writing tests that capture and verify snapshots effortlessly.
100
-
101
75
## The output structure
102
76
103
77
The results is split into two folders, for ease of comparison, and for handling stochastic/variable outputs (timestamps, generated ids, llm outputs, third party api responses etc).
@@ -112,12 +86,6 @@ Update snapshots with:
112
86
pytest --snapshot-update
113
87
```
114
88
115
-
A diff report in html can be generated with (not implemented yet ❌):
0 commit comments