@@ -37,9 +37,10 @@ import sys
38logger = logging.getLogger(__name__)
38logger = logging.getLogger(__name__)
40−# backwards compatible alias for Python 3
40+# from __future__ import range
41−if sys.version > '3':
41+# (python3's range, is same as python2's xrange)
42− xrange = range
42+if sys.version_info < (3,):
45class NotificationsBase(UnityTestCase):
46class NotificationsBase(UnityTestCase):
@@ -304,7 +305,7 @@ class InteractiveNotificationBase(NotificationsBase):
304 if self._notify_proc is None:
305 if self._notify_proc is None:
305 raise AssertionError("No interactive notification was created.")
306 raise AssertionError("No interactive notification was created.")
307− for i in xrange(timeout):
308+ for i in range(timeout):
308 self._notify_proc.poll()
309 self._notify_proc.poll()
309 if self._notify_proc.returncode is not None:
310 if self._notify_proc.returncode is not None:
310 output = self._notify_proc.communicate()
311 output = self._notify_proc.communicate()