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

Almost equal assertions #36

Merged
merged 1 commit into from
Apr 24, 2012
Merged

Almost equal assertions #36

merged 1 commit into from
Apr 24, 2012

Conversation

apatil
Copy link
Contributor

@apatil apatil commented Mar 9, 2012

Hello,

This pull request adds 'almost equal' assertions like NumPy's. See http://docs.scipy.org/doc/numpy/reference/generated/numpy.testing.assert_almost_equal.html . These are useful for testing special functions (for example, http://en.wikipedia.org/wiki/Gamma_function) and other numerical functions in which fine implementation details such as order of operations can slightly affect the result.

Anand

@logicalparadox
Copy link
Member

I definitely like the concept. I would ultimately like to see this somehow make its way into lib/assertion.js so it can be exposed to all of the interfaces, but that is not a hard requirement for the moment.

If you could also include some tests in test/assert.js then I can include this almost immediately. If not, then I will merge in next time we do a chai sprint.

@logicalparadox
Copy link
Member

@josher19 This was never merged as it was missing tests. See above. Also other things. If those are taken care of I would be more than happy to merge them in. Make sure your working off of a recent version of the master branch though.

@josher19
Copy link
Contributor

@logicalparadox: See pull #54

I see what you mean by master branch. Looks like the way you handle inspect has changed.
If it does not merge cleanly, I can re-fork on your master branch and resubmit.

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