generated from tophat/new-project-kit
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(amber): change serialization to be py syntax like (#505)
BREAKING CHANGE: update to serialization requires regeneration of snapshots Migration Guide * `pytest --snapshot-update` to regenerate amber snapshots
- Loading branch information
Showing
12 changed files
with
330 additions
and
339 deletions.
There are no files selected for viewing
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
2 changes: 1 addition & 1 deletion
2
tests/examples/__snaps_example__/test_custom_snapshot_directory.ambr
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# name: test_case_1 | ||
'Syrupy is amazing!' | ||
--- | ||
# --- |
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 |
---|---|---|
@@ -1,18 +1,18 @@ | ||
# name: test_snapshot_custom_class | ||
<class 'MyCustomClass'> { | ||
MyCustomClass( | ||
prop1=1, | ||
prop2='a', | ||
prop3=<class 'set'> { | ||
prop3=set({ | ||
1, | ||
2, | ||
3, | ||
}, | ||
} | ||
--- | ||
}), | ||
) | ||
# --- | ||
# name: test_snapshot_custom_repr_class | ||
MyCustomReprClass( | ||
prop1=1, | ||
prop2='a', | ||
prop3={1, 2, 3}, | ||
) | ||
--- | ||
# --- |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# name: test_canadian_name🇨🇦 | ||
'Name should be test_canadian_name🇨🇦.' | ||
--- | ||
# --- |
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
48 changes: 24 additions & 24 deletions
48
tests/syrupy/extensions/amber/__snapshots__/test_amber_filters.ambr
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 |
---|---|---|
@@ -1,36 +1,36 @@ | ||
# name: test_filters_error_prop[path_filter] | ||
<class 'WithNested'> { | ||
WithNested( | ||
include_me='prop value', | ||
nested=<class 'CustomClass'> { | ||
nested=CustomClass( | ||
include_me='prop value', | ||
}, | ||
} | ||
--- | ||
), | ||
) | ||
# --- | ||
# name: test_filters_error_prop[prop_filter] | ||
<class 'WithNested'> { | ||
WithNested( | ||
include_me='prop value', | ||
nested=<class 'CustomClass'> { | ||
nested=CustomClass( | ||
include_me='prop value', | ||
}, | ||
} | ||
--- | ||
), | ||
) | ||
# --- | ||
# name: test_filters_expected_paths | ||
<class 'dict'> { | ||
'list': <class 'list'> [ | ||
dict({ | ||
'list': list([ | ||
2, | ||
], | ||
'nested': <class 'dict'> { | ||
]), | ||
'nested': dict({ | ||
'other': 'value', | ||
}, | ||
} | ||
--- | ||
}), | ||
}) | ||
# --- | ||
# name: test_filters_expected_props | ||
<class 'dict'> { | ||
'list': <class 'list'> [ | ||
dict({ | ||
'list': list([ | ||
2, | ||
], | ||
'nested': <class 'dict'> { | ||
]), | ||
'nested': dict({ | ||
'other': 'value', | ||
}, | ||
} | ||
--- | ||
}), | ||
}) | ||
# --- |
Oops, something went wrong.