Repository navigation
Print fix #626
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
Print fix #626
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,7 +22,7 @@ def __init__(self): | |
| 'default': self._find_by_default | ||
| } | ||
| self._strategies = NormalizedDict(initial=strategies, caseless=True, spaceless=True) | ||
| self._default_strategies = strategies.keys() | ||
| self._default_strategies = list(strategies.keys()) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
||
| def find(self, browser, locator, tag=None): | ||
| assert browser is not None | ||
|
|
@@ -190,9 +190,7 @@ def _element_matches(self, element, tag, constraints): | |
| def _filter_elements(self, elements, tag, constraints): | ||
| elements = self._normalize_result(elements) | ||
| if tag is None: return elements | ||
| return filter( | ||
| lambda element: self._element_matches(element, tag, constraints), | ||
| elements) | ||
| return [element for element in elements if self._element_matches(element, tag, constraints)] | ||
|
|
||
| def _get_attrs_with_url(self, key_attrs, criteria, browser): | ||
| attrs = [] | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,14 +47,14 @@ def matches(self, invocation): | |
| return False | ||
| if len(self.named_params) != len(invocation.named_params): | ||
| return False | ||
| if self.named_params.keys() != invocation.named_params.keys(): | ||
| if list(self.named_params.keys()) != list(invocation.named_params.keys()): | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| return False | ||
|
|
||
| for x, p1 in enumerate(self.params): | ||
| if not self.compare(p1, invocation.params[x]): | ||
| return False | ||
|
|
||
| for x, p1 in self.named_params.iteritems(): | ||
| for x, p1 in self.named_params.items(): | ||
| if not self.compare(p1, invocation.named_params[x]): | ||
| return False | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -177,14 +177,14 @@ def _get_log_message(self, msg_str): | |
| import os | ||
|
|
||
| if not 2 <= len(sys.argv) <= 3 or '--help' in sys.argv: | ||
| print __doc__ | ||
| print(__doc__) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The whole |
||
| sys.exit(1) | ||
| infile = sys.argv[1] | ||
| outfile = sys.argv[2] if len(sys.argv) == 3 else None | ||
| print "Checking %s" % os.path.abspath(infile) | ||
| print("Checking %s" % os.path.abspath(infile)) | ||
| rc = process_output(infile, outfile) | ||
| if outfile: | ||
| print "Output: %s" % os.path.abspath(outfile) | ||
| print("Output: %s" % os.path.abspath(outfile)) | ||
| if rc > 255: | ||
| rc = 255 | ||
| sys.exit(rc) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
listisn't needed here.