Comments (5)
All, 1., 2. and 4. sound great, I have nothing to add there.
On 3rd point I have just few clarifying questions:
to_have_attributes()
is going to take a list of names of expected attributes as arguments?- What is
to_almost_equal()
meaning to match? Numeric similarity with some sort of acceptable delta?
Your changes are very welcome!
from expycted.
Regarding to_have_attributes
, I imaging the following overloaded signatures:
def to_have_attribute(self, key: str):
...
def to_have_attribute(self, key: str, value: Any):
...
def to_have_attributes(self, *keys: str):
...
An explanation of to_almost_equal
from the Python's built-in unittest
package.
from expycted.
Both sound great! Looking forward to the PR(s)!
from expycted.
@petereon Before I get started, one more question, is there a reason why you split alias and negated test into separate methods?
Example:
test_to_contain_subfolder
test_to_contain_subfolder_failing
test_to_not_contain_subfolder
test_to_not_contain_subfolder_failing
from expycted.
@bdsoha Yes, it's for legacy reasons, there have previously been separate implementations for negated matchers. Aliases don't necessarily make sense, I agree. As it is it would presumably make more sense to test just the __init__
method that it negates correctly.
from expycted.
Related Issues (20)
- Rewrite `greater_than_or_equal` as matcher
- Rewrite `greater_than` as matcher
- Rewrite `inherit` as matcher
- Rewrite filesystem as matchers
- Rewrite functions as matchers
- Return `Expectation` after assertion to allow chaining
- Add typing to decorators
- Security Policy
- CODEOWNERS
- Code of Conduct
- Run isort
- Add empty line at EOF
- Remove trailing whitespace
- Run spellchecking
- Contributing guidelines
- Add `strict` mode to matchers
- Add additional CI checks and tasks
- Raise `MatcherError` for type mismatches
- Add qualifiers to `InheritMatcher`
- Add weak qualifier to EqualMatcher HOT 1
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 expycted.