Gives you a pretty good diff between two objects
Project description
Pretty Good Diff
This tool allows developers to compare two objects and see a highlight of the differences between them. It works with strings and dictionaries.
This project was made to help me fix unit tests with failing assertions quicker, especially when the objects are huge or very nested and complicated.
I simply call show_diff
on the two objects before an assert statement.
show_diff
Import the show_diff
method like from pretty_good_diff import show_diff
.
Then, call show_diff(first_object, second_object)
to see a colored diff of the input objects. first_object
and second_object
need to have the same type and be either str
or dict
objects.
Before:
After:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pretty_good_diff-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92f29c90f06bd758abb01ccd3fe6ee72a2da3d002eafe026766e70d6097a9bce |
|
MD5 | e6657989721f46c1666991ace3bded9f |
|
BLAKE2b-256 | 668b68d504332757034f428a06dd479c4951f3cabc8ba068fa150207facf9d57 |