-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #114 from 15r10nk/fix_dirty_equals
fix: dirty_equals can be compared multiple times
- Loading branch information
Showing
8 changed files
with
397 additions
and
59 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
changelog.d/20240917_192956_15r10nk-git_fix_dirty_equals.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<!-- | ||
A new scriv changelog fragment. | ||
Uncomment the section that is right (remove the HTML comment wrapper). | ||
--> | ||
|
||
<!-- | ||
### Removed | ||
- A bullet item for the Removed category. | ||
--> | ||
<!-- | ||
### Added | ||
- A bullet item for the Added category. | ||
--> | ||
### Changed | ||
|
||
- star-expressions in list or dicts where never valid and cause a warning now. | ||
``` | ||
other=[2] | ||
assert [5,2]==snapshot([5,*other]) | ||
``` | ||
|
||
<!-- | ||
### Deprecated | ||
- A bullet item for the Deprecated category. | ||
--> | ||
### Fixed | ||
|
||
- A snapshot which contains an dirty-equals expression can now be compared multiple times. | ||
|
||
``` python | ||
def test_something(): | ||
greeting = "hello" | ||
for name in ["alex", "bob"]: | ||
assert (name, greeting) == snapshot((IsString(), "hello")) | ||
``` | ||
|
||
<!-- | ||
### Security | ||
|
||
- A bullet item for the Security category. | ||
|
||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.