Coerce pytest args to str to fix assertion error in pytest#2512
Merged
Conversation
Contributor
|
It appears we discovered a similar bug on Python < 2.7.3 at one point, because we already have this hack a few lines above: Maybe just do this for all versions of Python 2? |
Member
Author
|
Good point, @mdboom - didn't notice that! That seems to do the trick. |
Contributor
|
Ok. 👍 for me once Travis has digested it. |
Member
Author
|
Travis passed, so I'll merge now. |
eteq
added a commit
that referenced
this pull request
May 19, 2014
Coerce pytest args to str to fix assertion error in pytest in all py2.x
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes a problem I encountered when running the tests with
-ton an rst file. E.g.,python setup.py test -t coordinates/index.rstThat should run the doctests for just that file, but instead, it yields the cryptic traceback I've included at the bottom of this message. I traced the cause to a line deep in the bowels of pytest that doesisinstance(arg, str), which fails for unicode arguments. So this PR just forces the arguments passed into pytest for setting plugins to bestr.