Skip to content

Commit 1e4d174

Browse files
[py] fixed flake8 for interaction tests using unicode
1 parent a97b1dd commit 1e4d174

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

py/test/selenium/webdriver/common/interactions_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ def _get_events(driver):
285285
if "key" in e and e["key"].startswith(u"U+"):
286286
key = e["key"]
287287
hex_suffix = key[key.index("+") + 1:]
288-
e["key"] = unichr(int(hex_suffix, 16))
288+
e["key"] = chr(int(hex_suffix, 16))
289289

290290
# WebKit sets code as 'Unidentified' for unidentified key codes, but
291291
# tests expect ''.

py/test/selenium/webdriver/common/w3c_interaction_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ def _get_events(driver):
298298
if "key" in e and e["key"].startswith(u"U+"):
299299
key = e["key"]
300300
hex_suffix = key[key.index("+") + 1:]
301-
e["key"] = unichr(int(hex_suffix, 16))
301+
e["key"] = chr(int(hex_suffix, 16))
302302

303303
# WebKit sets code as 'Unidentified' for unidentified key codes, but
304304
# tests expect ''.

0 commit comments

Comments
 (0)