'unittest for the expected behavior to obtain ids for parametrized
bytes values:
- python2: non-ascii strings are considered bytes and formatted using
"binary escape", where any byte < 127 is escaped into its hex form.
- python3: bytes objects are always escaped using "binary escape".'

def test_bytes_idval(self):

    from _pytest.python import _idval
    values = [('', ''), ('\xc3\xb4\xff\xe4', '\\xc3\\xb4\\xff\\xe4'), ('ascii', 'ascii'), (u'\u03b1\u03c1\u03ac'.encode('utf-8'), '\\xce\\xb1\\xcf\\x81\\xce\\xac')]
    for (val, expected) in values:
        assert (_idval(val, 'a', 6, None) == expected)
