Closed
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.