-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
good first issueeasy issue that is friendly to new contributoreasy issue that is friendly to new contributorstatus: criticalgrave problem or usability issue that affects lots of usersgrave problem or usability issue that affects lots of usersstatus: help wanteddevelopers would like help from experts on this topicdevelopers would like help from experts on this topictopic: parametrizerelated to @pytest.mark.parametrizerelated to @pytest.mark.parametrizetype: bugproblem that needs to be addressedproblem that needs to be addressed
Description
When running py.test 2.9.0 on Python 3.5.0 on Linux (but probably all other OSes and other Python 3 versions too) the following code raises an error:
import pytest
import re
@pytest.mark.parametrize('r', [re.compile(b'foo')])
def test_stuff(r):
pass
The error raised is:
lib/python3.5/site-packages/_pytest/python.py:1136: in _idvalset
return "-".join(this_id)
E TypeError: sequence item 0: expected str instance, bytes found
Presumably some special case code for dealing with regular expressions that doesn't handle bytes ones.
Metadata
Metadata
Assignees
Labels
good first issueeasy issue that is friendly to new contributoreasy issue that is friendly to new contributorstatus: criticalgrave problem or usability issue that affects lots of usersgrave problem or usability issue that affects lots of usersstatus: help wanteddevelopers would like help from experts on this topicdevelopers would like help from experts on this topictopic: parametrizerelated to @pytest.mark.parametrizerelated to @pytest.mark.parametrizetype: bugproblem that needs to be addressedproblem that needs to be addressed