Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insert assert #126

Merged
merged 12 commits into from
Apr 5, 2023
Merged

Insert assert #126

merged 12 commits into from
Apr 5, 2023

Conversation

samuelcolvin
Copy link
Owner

@samuelcolvin samuelcolvin commented Apr 5, 2023

See this gist and this tweet by @adriangb for rationale.

Waiting for samuelcolvin/pytest-pretty#10

Replaces samuelcolvin/dirty-equals#51 - I've been using this by installing from the pull request for ages, time to make it a proper thing.

@samuelcolvin
Copy link
Owner Author

As suggested by @adriangb, this now fails on insert, but but uses a nice symbol in the pytest output.

@codecov
Copy link

codecov bot commented Apr 5, 2023

Codecov Report

Merging #126 (0cbe4e4) into main (f0e0fb2) will decrease coverage by 2.64%.
The diff coverage is 88.33%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #126      +/-   ##
==========================================
- Coverage   98.90%   96.27%   -2.64%     
==========================================
  Files           7        8       +1     
  Lines         547      724     +177     
  Branches       76      110      +34     
==========================================
+ Hits          541      697     +156     
- Misses          4       21      +17     
- Partials        2        6       +4     
Impacted Files Coverage Δ
devtools/pytest_plugin.py 88.13% <88.13%> (ø)
devtools/prettier.py 98.00% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f0e0fb2...0cbe4e4. Read the comment docs.

@samuelcolvin
Copy link
Owner Author

would be nice to try to add support for dirty-equals types (even though this has moved to another repo), in particular:

  • stuff where the repr breaks black, the formatting vanishes which is ugly.
  • stuff like datetimes close to now and uuids which will change often.

But that can happen later.

@samuelcolvin samuelcolvin merged commit 61c6b67 into main Apr 5, 2023
@samuelcolvin samuelcolvin deleted the insert_assert branch April 5, 2023 17:59
@samuelcolvin
Copy link
Owner Author

could do with documenting, but I ran out of time 🏃 🙉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant