[Webkit-unassigned] [Bug 221981] [LayoutTests] Convert http/tests/misc convert PHP to Python

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 19 15:41:46 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=221981

--- Comment #18 from Chris Gambrell <cgambrell at apple.com> ---
(In reply to Jonathan Bedard from comment #8)
> Comment on attachment 420792 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=420792&action=review
> 
> > LayoutTests/http/tests/misc/resources/charset-sniffer-end-sniffing.py:15
> > +for i in range(0, 10000):
> 
> The usual idiom when you have a variable that you need to complete a
> statement but that you are not actually going to use is to use '_'
> 
> > LayoutTests/http/tests/misc/resources/check-test-file.py:28
> > +        'PASS: File upload was successful\n'
> 
> Is there any "error" equivalent in Python? This code isn't exactly the same,
> although it's the same in the successful case, so that's probably sufficient.
> 
> > LayoutTests/http/tests/misc/resources/check-unnamed-file-included-in-formdata.py:23
> > +if data != None:
> 
> Style is to use "data is not None" in this case.
> 
> > LayoutTests/http/tests/misc/resources/redirect-to-http-url.py:1
> > +#!/usr/bin/env python3
> 
> Is there a php file being removed here?
> 
> > LayoutTests/http/tests/misc/resources/referrer-main-resource.py:6
> > +referer = os.environ.get('HTTP_REFERER', '')
> 
> Don't need the default empty string (since you aren't printing it) and you
> probably don't need the variable either and could just put the
> os.environ.get in the if statement
> 
> > LayoutTests/http/tests/misc/resources/referrer-result.py:14
> > +# formatting string
> 
> Remove this comment. I suspect the issue is about the brackets in the
> string, and can be mitigated with double brackets, but it's not a huge issue
> if these stay as "prints"
> 
> > LayoutTests/http/tests/misc/resources/stylesheet-bad-mime-type.py:18
> > +    sys.stdout.write('\r\n')
> 
> I think we want the 406 status code here

Fixed in comment 17

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210219/55621c53/attachment.htm>


More information about the webkit-unassigned mailing list