Skip to content

ARROW-2508: [Python] Fix pytest.raises msg to message - #1944

Closed
pcmoritz wants to merge 2 commits into
apache:masterfrom
pcmoritz:fix-pytest-msg
Closed

ARROW-2508: [Python] Fix pytest.raises msg to message#1944
pcmoritz wants to merge 2 commits into
apache:masterfrom
pcmoritz:fix-pytest-msg

Conversation

@pcmoritz

Copy link
Copy Markdown
Contributor

No description provided.


expected_msg = 'Timestamp value had non-zero intraday milliseconds'
with pytest.raises(pa.ArrowInvalid, msg=expected_msg):
with pytest.raises(pa.ArrowInvalid, message=expected_msg):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

As I said on JIRA, this should actually use the match argument: message specifies the failure message in case the test fails, not the exception test to match with.

@pitroupitrou changed the title ARROW-2508: Fix pytest.raises msg to messageARROW-2508: [Python] Fix pytest.raises msg to messageApr 25, 2018

@pitroupitrou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1

Sign up for freeto 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

@pcmoritz@pitrou