Skip to content
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

Regression in v3.2.0 - when using null bytes in parameter strings. #2669

Closed
samuelfekete opened this issue Aug 8, 2017 · 2 comments
Closed

Comments

@samuelfekete
Copy link

This error only happens when using the latest version: 3.2.0

When using a parameter string that contains a null character, for example:

@pytest.mark.parametrize(
    'display_name',
    ('null-byte-\0.txt', 'forward/slash', r'back\slash')
)

The following error is raised:

    def __setitem__(self, key, item):
>       putenv(key, item)
E       TypeError: must be string without null bytes, not str

.tox/py27/lib/python2.7/os.py:473: TypeError
@The-Compiler
Copy link
Member

Duplicate of #2644, fixed by #2646, which will be part of pytest 3.2.1 soon.

@samuelfekete
Copy link
Author

Thanks @The-Compiler

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