aports/testing/py3-pyee/fix-tests.patch
2020-05-06 20:36:43 +00:00

33 lines
956 B
Diff

Upstream pull-request: https://github.com/jfhbrook/pyee/pull/69
Commit modified to not touch not-existing-in-release-tarball tox.ini
From e1928cc0484812345a87d20f88392d0dfab72c12 Mon Sep 17 00:00:00 2001
From: Joshua Holbrook <josh.holbrook@gmail.com>
Date: Tue, 5 May 2020 12:45:16 -0400
Subject: [PATCH] Tests pass on python 3.8
---
tests/test_async.py | 7 ++++++-
tox.ini | 14 ++++++++++++--
2 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/tests/test_async.py b/tests/test_async.py
index 64ede82..01ec221 100644
--- a/tests/test_async.py
+++ b/tests/test_async.py
@@ -4,7 +4,12 @@
import pytest_asyncio.plugin # noqa
from asyncio import Future, wait_for
-from concurrent.futures import TimeoutError
+
+try:
+ from asyncio.exceptions import TimeoutError
+except ImportError:
+ from concurrent.futures import TimeoutError
+
from mock import Mock
from twisted.internet.defer import ensureDeferred, succeed