Skip to content

non-ascii parametrized arguments throw UnicodeDecodeErrors as of 2.8.1 #1107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hummus opened this issue Oct 2, 2015 · 2 comments
Closed

Comments

@hummus
Copy link

hummus commented Oct 2, 2015

non-ascii parametrized arguments throw UnicodeDecodeErrors as of 2.8.1.

test_unicode_parametrize.py:
# -*- coding: utf-8 -*-
import pytest

@pytest.mark.parametrize(u'foo', (u'ç',))
def test_foo(foo):
    assert True
to reproduce:
$ pip install pytest==2.8.0
$ py.test -x test_unicode_parametrize.py
....
===== 1 passed
$ pip install pytest==2.8.1
$ py.test -x test_unicode_parametrize.py
E   UnicodeEncodeError: 'ascii' codec can't encode character u'\xe7' in position 0: ordinal not in range(128)
@The-Compiler
Copy link
Member

This should be fixed in #1092 and already has a handful of duplicates 😉

Can you verify it works with your testsuite when running the current master?

pip install git+https://github.com/pytest-dev/pytest

there should be a 2.8.2 release with the fix early next week.

@hummus
Copy link
Author

hummus commented Oct 2, 2015

sorry should have checked that first! master is fine.

@hummus hummus closed this as completed Oct 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants