-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
pytest 3.2 breaks pytest.mark.parametrize with null bytes #2644
Comments
Thanks for the quick report @alex. This is due to the new |
Yeah, looks like you'll want some sort of escaping scheme. (Maybe also truncation for really long values?) |
Thanks for jumping on this! |
#2646 is up. This fix will be released in 3.2.1. Thanks again for the quick report! |
While this is not released, a workaround is to set an import pytest
@pytest.mark.parametrize("data", [pytest.param("\x00", id='null')])
def test_foo(data):
assert data
# alternatively
import pytest
@pytest.mark.parametrize("data", ["\x00"], ids=['null'])
def test_foo(data):
assert data This has the additional benefit of showing nicely on the terminal. |
@see pytest-dev/pytest#2644 No need to revert this when 3.2.1 is released, because it provides a cleaner view in the pytest output
Is there a plan for when 3.2.1 will be released? |
Hi @alex, I was thinking about releasing 3.2.1 next Monday/Tuesday. Is that acceptable for you guys? |
@nicoddemus It actually doesn't affect us really, I'm asking because one of our distributors (Fedora Raw Hide) was complaining :-) /cc @tiran |
@nicoddemus sure, that's fine with me. Thanks for your fix! For rawhide I simply removed the test case. F26 has an older pytest version. |
* Blacklist pytest 3.2.0 because it breaks us (#3835) See upstream: pytest-dev/pytest#2644 * fix for latest flake8 (#3829)
see pytest-dev/pytest#2644 for reference
see pytest-dev/pytest#2644 for reference
It seems that the same issue occurs again with pytest 3.3. Our build was working fine with pytest 3.2.5 and now we get this: |
The text was updated successfully, but these errors were encountered: