Группа :: Development/Python3
Пакет: python3-module-contextlib2
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: python3-module-contextlib2-21.6.0-alt.patch
Скачать
Скачать
test/test_contextlib.py | 4 ++--
tox.ini | 6 +-----
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/test/test_contextlib.py b/test/test_contextlib.py
index f09090a..640e903 100644
--- a/test/test_contextlib.py
+++ b/test/test_contextlib.py
@@ -494,7 +494,7 @@ class TestContextDecorator(unittest.TestCase):
def __exit__(self, *exc):
pass
- with self.assertRaises(AttributeError):
+ with self.assertRaises((AttributeError, TypeError)):
with mycontext():
pass
@@ -506,7 +506,7 @@ class TestContextDecorator(unittest.TestCase):
def __uxit__(self, *exc):
pass
- with self.assertRaises(AttributeError):
+ with self.assertRaises((AttributeError, TypeError)):
with mycontext():
pass
diff --git a/tox.ini b/tox.ini
index 43a90fa..c2c01b7 100644
--- a/tox.ini
+++ b/tox.ini
@@ -4,11 +4,7 @@ skip_missing_interpreters = True
[testenv]
commands =
- coverage run -m unittest discover -t . -s test
- coverage report
- coverage xml
- # mypy won't install on PyPy, so only run the typechecking on CPython
- !pypy3: python -m mypy.stubtest --allowlist dev/mypy.allowlist contextlib2
+ python -m unittest discover -t . -s test
deps =
coverage
!pypy3: mypy