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

Python3: make newly introduced python file Python3 compatible #26112

Merged
merged 2 commits into from Oct 27, 2020

Conversation

ziransun
Copy link
Member

No description provided.

Copy link
Member

@Hexcles Hexcles left a comment

Choose a reason for hiding this comment

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

LGTM % nits

subresource_path = "/" + os.path.relpath(__file__, base_path).replace('\\','/')
subresource_params = "?partition_id=" + partition_id + "&uuid=" + uuid + "&subresource_origin=" + subresource_origin + "&include_credentials=" + include_credentials
body = body.replace("SUBRESOURCE_PREFIX:", subresource_origin + subresource_path + subresource_params)
subresource_path = u"/" + os.path.relpath(isomorphic_decode(__file__), base_path).replace(u'\\', u'/')
Copy link
Member

Choose a reason for hiding this comment

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

Nit: it's better to make subresource_path binary in the first place, as all subsequent uses (along with subresource_params) are all binary.

Copy link
Member Author

Choose a reason for hiding this comment

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

Code updated. Thank you!

server_state = stash.take(uuid) or {u"test_failed": False}
if address_key in server_state and server_state[address_key] != isomorphic_decode(partition_id):
server_state[u"test_failed"] = True
server_state[address_key] = isomorphic_decode(partition_id)
Copy link
Member

Choose a reason for hiding this comment

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

Nit: can we directly store and compare the binary partition_id?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. Code updated.

@ziransun
Copy link
Member Author

@Hexcles, are the updated changes okay? Thank you!

@Hexcles Hexcles merged commit c250a5c into web-platform-tests:master Oct 27, 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.

None yet

4 participants