No flags found
Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.
e.g., #unittest #integration
#production #enterprise
#frontend #backend
Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.
e.g., #unittest #integration
#production #enterprise
#frontend #backend
12 | 12 | from w3lib.html import strip_html5_whitespace |
|
13 | 13 | ||
14 | 14 | from scrapy.http.request import Request |
|
15 | - | from scrapy.utils.python import to_bytes, is_listlike |
|
16 | 15 | from scrapy.utils.response import get_base_url |
|
17 | 16 | ||
18 | 17 |
27 | 26 | super().__init__(*args, **kwargs) |
|
28 | 27 | ||
29 | 28 | if formdata: |
|
30 | - | items = formdata.items() if isinstance(formdata, dict) else formdata |
|
31 | - | querystr = _urlencode(items, self.encoding) |
|
29 | + | querystr = urlencode(formdata, doseq=1, encoding=self.encoding) |
|
32 | 30 | if self.method == 'POST': |
|
33 | 31 | self.headers.setdefault(b'Content-Type', b'application/x-www-form-urlencoded') |
|
34 | 32 | self._set_body(querystr) |
67 | 65 | return urljoin(form.base_url, url) |
|
68 | 66 | ||
69 | 67 | ||
70 | - | def _urlencode(seq, enc): |
|
71 | - | values = [(to_bytes(k, enc), to_bytes(v, enc)) |
|
72 | - | for k, vs in seq |
|
73 | - | for v in (vs if is_listlike(vs) else [vs])] |
|
74 | - | return urlencode(values, doseq=1) |
|
75 | - | ||
76 | - | ||
77 | 68 | def _get_form(response, formname, formid, formnumber, formxpath): |
|
78 | 69 | """Find the form element """ |
|
79 | 70 | root = create_root_node(response.text, lxml.html.HTMLParser, |
Learn more Showing 1 files with coverage changes found.
scrapy/extensions/memusage.py
Files | Coverage |
---|---|
scrapy | +<.01% 88.02% |
Project Totals (158 files) | 88.02% |
#4953
c58f3cd
39bc9a4