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

Python 3: port tests in xhr [part 3] #24274

Merged
merged 1 commit into from Jul 14, 2020
Merged

Conversation

ziransun
Copy link
Member

No description provided.

response.headers.set('Access-Control-Max-Age', '0')
response.headers.set('Access-Control-Allow-Headers', headers)
headers = b'x-custom-s,x-custom-test,x-custom-u,x-custom-ua,x-custom-v'
if request.method == u'OPTIONS':
Copy link
Member

Choose a reason for hiding this comment

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

This exception to the "always use byte sequences" general rule isn't documented in https://github.com/web-platform-tests/rfcs/blob/master/rfcs/wptserve_py3.md. Is there more up-to-date guidance for test authors/reviewers which covers this?

Copy link
Member Author

Choose a reason for hiding this comment

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

#23362 is the tracking issue.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, thanks!

auth = imp.load_source("", os.path.join(here,
"..",
"authentication.py"))
auth = imp.load_source(u"", os.path.join(here,
Copy link
Member

Choose a reason for hiding this comment

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

It looks like getting this import right is the source of most of the complexity, and that imp.load_source is only used in these tests and in service-workers/, apart from tools/. Still I don't know if there is a better way, searching I've come up empty-handed and think that adding a __init__.py and using from .. import authentication might be the only way.

@Hexcles @jgraham is there some way to clean this up to avoid all of the path juggling here?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

I've filed #24588 about this to unblock this PR.

@foolip
Copy link
Member

foolip commented Jul 14, 2020

wpt-firefox-nightly-stability failed on Taskcluster, but I'm betting that was pre-existing flakiness and will admin merge.

@foolip foolip merged commit bf309bb into web-platform-tests:master Jul 14, 2020
@stephenmcgruer
Copy link
Contributor

Stability check failure was:

 1:18.19 INFO ## Unstable results ##
 1:18.19 INFO |                 Test                 |                                                Subtest                                                 |          Results           |                      Messages                     |
 1:18.19 INFO |--------------------------------------|--------------------------------------------------------------------------------------------------------|----------------------------|---------------------------------------------------|
 1:18.19 INFO | `/xhr/send-authentication-basic.htm` | `XMLHttpRequest: send() - "Basic" authenticated requests with user name and password passed to open()` | **FAIL: 9/10, PASS: 1/10** | `assert_equals: expected "DID" but got "DID-NOT"` |
 1:18.19 INFO 

wpt.fyi does not show any history of flake via single-runs. I'll look into reproducing this before/after this PR to confirm.

@stephenmcgruer
Copy link
Contributor

I can reproduce at 2300345, which should be before this PR, so we should be good.

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

5 participants