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

tests: add true/false/contains/doesNotCointain assertions #147

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

justinnoah
Copy link
Collaborator

No description provided.

Copy link
Contributor

@MostAwesomeDude MostAwesomeDude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -163,6 +163,37 @@ def makeAsserter() as DeepFrozen:
catch _:
successes += 1

to contains(o, k):
if (o._respondsTo("contains", 1)):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why bother with the o._respondsTo("contains", 1) checks?

If o.contains(k) throws refused, that's a bug that should be reported as such, no? Why change it to assert.fail()?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It allows for error message customization. Pretty much all of these methods are about customized errors and easier-to-read testing flows.

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.

3 participants