Skip to content

Python 3: Pass binary argument to base64.decodestring()#25040

Merged
stephenmcgruer merged 2 commits intoweb-platform-tests:masterfrom
ziransun:webdriver-base64
Aug 17, 2020
Merged

Python 3: Pass binary argument to base64.decodestring()#25040
stephenmcgruer merged 2 commits intoweb-platform-tests:masterfrom
ziransun:webdriver-base64

Conversation

@ziransun
Copy link
Member

No description provided.

def assert_pdf(data):
assert data.startswith("%PDF-"), "Decoded data starts with the PDF signature"
assert data.endswith("%%EOF\n"), "Decoded data ends with the EOF flag"
assert data.startswith(b"%PDF-"), b"Decoded data starts with the PDF signature"
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think the second argument to assert needs to be a byte string?

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated. Thank you!

@stephenmcgruer stephenmcgruer merged commit d9d78b5 into web-platform-tests:master Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants