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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pretty-good-diff-0.1.0.tar.gz.
File metadata
- Download URL: pretty-good-diff-0.1.0.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e60b396b28b1348b3c243038b94f15d82e25777cc06a26ce5c6ba9d6abc3bc3b
|
|
| MD5 |
c52a3c674c139fe8846404a2b5993245
|
|
| BLAKE2b-256 |
d8e10c875652f9b824da40d55d97e0708c523dc77f4e2c56faee827d534f10c4
|
File details
Details for the file pretty_good_diff-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pretty_good_diff-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92f29c90f06bd758abb01ccd3fe6ee72a2da3d002eafe026766e70d6097a9bce
|
|
| MD5 |
e6657989721f46c1666991ace3bded9f
|
|
| BLAKE2b-256 |
668b68d504332757034f428a06dd479c4951f3cabc8ba068fa150207facf9d57
|