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

[Py3] fix various issues in tests related to BytesWarning #440

Closed
wants to merge 3 commits into from
Closed

[Py3] fix various issues in tests related to BytesWarning #440

wants to merge 3 commits into from

Conversation

MartinBasti
Copy link
Contributor

@MartinBasti MartinBasti commented Feb 7, 2017

No description provided.

User repr() instead of str() for bytes, it has the same effect, but it
is proper way how to print bytes

https://fedorahosted.org/freeipa/ticket/4985
DN must be converted to bytes as other variables adn lists contain bytes

https://fedorahosted.org/freeipa/ticket/4985
@stlaz stlaz self-assigned this Feb 8, 2017
name, i, item.__class__.__name__, item))
raise TypeError(
"%s[%d] value must be bytes, got %s object %r" % (
name, i, item.__class__.__name__, item)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should really use str.format() here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick, leave it consistent with other code in that module, can be refactored at once later

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok.

@stlaz stlaz added the ack Pull Request approved, can be merged label Feb 8, 2017
@MartinBasti
Copy link
Contributor Author

MartinBasti commented Feb 8, 2017

The last commit had wrong ticket

@MartinBasti MartinBasti added the pushed Pull Request has already been pushed label Feb 8, 2017
@MartinBasti MartinBasti closed this Feb 8, 2017
@MartinBasti MartinBasti deleted the py3-tests-bytes branch February 8, 2017 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ack Pull Request approved, can be merged pushed Pull Request has already been pushed
Projects
None yet
2 participants