Skip to content

func arg for has_expr for custom equality check#230

Merged
machow merged 2 commits intomasterfrom
feature-custom-eq
Jun 29, 2017
Merged

func arg for has_expr for custom equality check#230
machow merged 2 commits intomasterfrom
feature-custom-eq

Conversation

@machow
Copy link
Copy Markdown
Contributor

@machow machow commented Jun 28, 2017

addresses #218 , by adding a func argument to SCTs like has_equal_value.

E.g. Ex().check_object('x').has_equal_value(func = lambda x, y: x == y)

Or with numpy

from numpy import allclose
Ex().check_object('x').has_equal_value(func = lambda x, y: allclose(x, y, atol = .01))

# or without atol option
Ex().check_object('x').has_equal_value(func = allclose)

@machow machow self-assigned this Jun 28, 2017
@machow machow requested a review from filipsch June 28, 2017 13:30
Copy link
Copy Markdown
Contributor

@filipsch filipsch left a comment

Choose a reason for hiding this comment

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

LGTM; clean!

@machow machow merged commit 2abc3c3 into master Jun 29, 2017
@machow machow deleted the feature-custom-eq branch January 2, 2018 15:33
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.

2 participants