Pytest Style analysis/test_psa.py #1569
Merged
Conversation
err_msg = "Dendrogram dictionary object was not produced" | ||
assert_(type(self.plot_data[1]) is dict, err_msg) | ||
assert type(plot_data[1]) is dict, err_msg |
jbarnoud
Jul 30, 2017
Contributor
isinstance
is probably more appropriate than type(...) is ...
.
isinstance
is probably more appropriate than type(...) is ...
.
self.path_2) | ||
self.expected = (np.mean(np.amin(self.distance_matrix, axis=0)) + | ||
np.mean(np.amin(self.distance_matrix, axis = 1))) / 2. | ||
# TODO: Fix this hack! without the fixture the test says I passed 3 |
jbarnoud
Jul 30, 2017
Contributor
Could h
be a class attribute rather than a fixture?
Could h
be a class attribute rather than a fixture?
utkbansal
Jul 30, 2017
Author
Member
I did try that, but when I make it a class attribute, the test fails saying that h
expected 2 parameters but got 3.
I did try that, but when I make it a class attribute, the test fails saying that h
expected 2 parameters but got 3.
jbarnoud
Jul 30, 2017
Contributor
It looks indeed like h
, when defined as a class attribute, is taken as a method. I guess you could define it as h = staticmethod(PSA.hausdorff_wavg)
but I am not sure it is much better than the fixture. Maybe somebody will come with an idea. If not, we'll survive with the fixture.
It looks indeed like h
, when defined as a class attribute, is taken as a method. I guess you could define it as h = staticmethod(PSA.hausdorff_wavg)
but I am not sure it is much better than the fixture. Maybe somebody will come with an idea. If not, we'll survive with the fixture.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Fixes #
Changes made in this Pull Request:
PR Checklist