[eog] Fix Python 3 incompatibility in installed tests
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog] Fix Python 3 incompatibility in installed tests
- Date: Sat, 3 Sep 2016 17:53:12 +0000 (UTC)
commit 6b022222195dc9a4905030829e64e0db57558318
Author: Felix Riemann <friemann gnome org>
Date: Sat Sep 3 19:51:38 2016 +0200
Fix Python 3 incompatibility in installed tests
It's a list in Py2 but an iterator in Py3 now,
but it shouldn't make a difference to the for-operator.
tests/common_steps.py | 2 +-
tests/steps/steps.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tests/common_steps.py b/tests/common_steps.py
index cd20ccc..4968655 100644
--- a/tests/common_steps.py
+++ b/tests/common_steps.py
@@ -133,7 +133,7 @@ class App(object):
self.a11yAppName = self.internCommand
# Trap weird bus errors
- for attempt in xrange(0, 10):
+ for attempt in range(0, 10):
try:
return self.a11yAppName in [x.name for x in root.applications()]
except GLib.GError:
diff --git a/tests/steps/steps.py b/tests/steps/steps.py
index 3470a00..35549a8 100644
--- a/tests/steps/steps.py
+++ b/tests/steps/steps.py
@@ -49,7 +49,7 @@ def open_file_via_menu(context, filename):
@then(u'image size is {width:d}x{height:d}')
def image_size_is(context, width, height):
size_text = None
- for attempt in xrange(0, 10):
+ for attempt in range(0, 10):
size_child = context.app.child(roleName='page tab list').child(translate('Size'))
size_text = size_child.parent.children[11].text
if size_text == '':
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]