Skip to content

Conversation

jtratner
Copy link
Contributor

@jtratner jtratner commented Jun 2, 2013

Most tests (in pandas' test suite and in general) are of form
assert_almost_equal(result, expected). Verbose error message was
treating its first argument as expected, this is now fixed.

Previous message was:

err_msg = lambda a, b: 'expected %.5f but got %.5f' % (a, b)

But a, the first argument, is actually actual, not expected.

Everywhere else, it makes sense to display "%s != %s" % (a,b)

@jreback
Copy link
Contributor

jreback commented Jun 2, 2013

can you hook up travis? (I know this is a trivial PR, but for the future)

@jtratner
Copy link
Contributor Author

jtratner commented Jun 2, 2013

I set it up...hadn't realized I needed to enable it in travis-ci. Do you want me to redo this commit to trigger it?

@jreback
Copy link
Contributor

jreback commented Jun 2, 2013

sure
git commit --amend -C HEAD
will force a Travis update

Most tests are of form assert_almost_equal(result, expected).  Verbose
error message was treating its first argument as expected, this is now
fixed.
@jtratner
Copy link
Contributor Author

jtratner commented Jun 2, 2013

got it - thanks!

@jreback
Copy link
Contributor

jreback commented Jun 2, 2013

@wesm this looks fine for 0.11

jreback added a commit that referenced this pull request Jun 3, 2013
TST: Fix assert_almost_equal error message
@jreback jreback merged commit 162e255 into pandas-dev:master Jun 3, 2013
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