Comments (2)
Yes, this is already supported, but you have to use an instance of AnyThing
, not the type, e.g. the following hides foo
from the diff:
from dirty_equals import AnyThing
def test_dirty():
x = {
"foo": [1, 2, 3, 4, 5, 6, 7, 87, 8, 45, 3, 3, 2, 35, 4, 6, 56, 56, 34],
"bar": "zbr",
}
assert x == {"foo": AnyThing(), "bar": "zbr..."}
This is explained at the bottom of the usage section of docs
from dirty-equals.
🤦 Thanks! 🙏
from dirty-equals.
Related Issues (20)
- unix datetime tests fail if TZ != UTC HOT 5
- Numerous test failures with pypy3.9 HOT 5
- Wrong version number in releases HOT 3
- IsDict - Allow ignoring keys HOT 3
- Include documentation on how this works HOT 3
- Idea: generate is now for IsNow only at moment when comparing HOT 3
- Wrong repr? HOT 2
- Installing from git (or a git snapshot) results in package version being 0 HOT 13
- fix `IsNow` HOT 1
- nan type HOT 6
- PyPy3.9 7.3.10 test regression: tests/test_inspection.py::test_has_attributes[-HasAttributes(a=1, b=2, spam=AnyThing)] HOT 3
- dirty isinstance HOT 5
- `IsFloat` should have an `exact` argument
- A way to ensure that all elements in a sequence match constraint HOT 2
- `IsInstance` does not work for Pydantic BaseModels HOT 3
- `IsDataclass` type HOT 4
- DeprecationWarning for datetime.utcfromtimestamp() in Python 3.12 HOT 2
- IsUrl seems to be broken with pydantic-2 HOT 7
- objects with multiline repr cause pytest to print a diff HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dirty-equals.