-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix(serializer): preserve trailing newlines in ambr serialization #950
Conversation
@@ -168,7 +172,7 @@ def __read_file_with_markers( | |||
if test_name and snapshot_data: | |||
yield Snapshot( | |||
name=test_name, | |||
data=snapshot_data.rstrip(os.linesep), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We were trimming too much. Only meant to trim the last char
Codecov ReportAttention: Patch coverage is @@ Coverage Diff @@
## next #950 +/- ##
==========================================
- Coverage 97.83% 97.77% -0.07%
==========================================
Files 21 21
Lines 1616 1617 +1
==========================================
Hits 1581 1581
- Misses 35 36 +1 |
BREAKING CHANGE: Trailing newlines are now preserved in amber serialization. This mostly affects serialization of custom repr implementations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark
Benchmark suite | Current: b77b005 | Previous: b7f5a9d | Ratio |
---|---|---|---|
benchmarks/test_1000x.py::test_1000x_reads |
0.7738313676687634 iter/sec (stddev: 0.07879161063425968 ) |
0.7985141212181278 iter/sec (stddev: 0.05282275712328596 ) |
1.03 |
benchmarks/test_1000x.py::test_1000x_writes |
0.6639295546681687 iter/sec (stddev: 0.2627945070184551 ) |
0.698901352248691 iter/sec (stddev: 0.24551960819132626 ) |
1.05 |
benchmarks/test_standard.py::test_standard |
0.6855419304758074 iter/sec (stddev: 0.10011401104717381 ) |
0.7294161208407376 iter/sec (stddev: 0.06718845368778603 ) |
1.06 |
This comment was automatically generated by workflow using github-action-benchmark.
BREAKING CHANGE: Trailing newlines are now preserved in amber serialization. This mostly affects serialization of custom repr implementations.
BREAKING CHANGE: Trailing newlines are now preserved in amber serialization. This mostly affects serialization of custom repr implementations.
Closes #925