From 74540d0f6c4415bfd74b1461347e0e73d5e08f26 Mon Sep 17 00:00:00 2001 From: Darren Burns Date: Wed, 4 May 2022 10:21:31 +0100 Subject: [PATCH 1/3] Skip CI-based MacOS devtools tests --- tests/devtools/__init__.py | 13 +++++++++++++ tests/devtools/test_devtools.py | 2 ++ 2 files changed, 15 insertions(+) diff --git a/tests/devtools/__init__.py b/tests/devtools/__init__.py index e69de29bb..a30811ded 100644 --- a/tests/devtools/__init__.py +++ b/tests/devtools/__init__.py @@ -0,0 +1,13 @@ +import os +import sys + +import pytest + +# TODO - this needs to be revisited - perhaps when aiohttp 4.0 is released? +# We get occasional test failures relating to devtools. These *appear* to be limited to MacOS, +# and the error messages suggest the event loop is being shutdown before async fixture +# teardown code has finished running. These are very rare, but are much more of an issue on +# CI since they can delay builds that have passed locally. +pytestmark = pytest.mark.skipif( + sys.platform == "darwin" and os.getenv("CI"), reason="Issue #411" +) diff --git a/tests/devtools/test_devtools.py b/tests/devtools/test_devtools.py index 833c3daf2..8616aba5b 100644 --- a/tests/devtools/test_devtools.py +++ b/tests/devtools/test_devtools.py @@ -1,3 +1,5 @@ +import os +import sys from datetime import datetime, timezone import pytest From 5e220b94681ebc13f6f48e434e0e3a3109597daa Mon Sep 17 00:00:00 2001 From: Darren Burns Date: Wed, 4 May 2022 10:31:11 +0100 Subject: [PATCH 2/3] Remove unused imports --- tests/devtools/test_devtools.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/devtools/test_devtools.py b/tests/devtools/test_devtools.py index 8616aba5b..833c3daf2 100644 --- a/tests/devtools/test_devtools.py +++ b/tests/devtools/test_devtools.py @@ -1,5 +1,3 @@ -import os -import sys from datetime import datetime, timezone import pytest From b97323443315646828706be558d0be7c08287a84 Mon Sep 17 00:00:00 2001 From: Darren Burns Date: Wed, 4 May 2022 10:48:27 +0100 Subject: [PATCH 3/3] Fix skipif expression --- tests/devtools/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/devtools/__init__.py b/tests/devtools/__init__.py index a30811ded..54fbfd20f 100644 --- a/tests/devtools/__init__.py +++ b/tests/devtools/__init__.py @@ -9,5 +9,5 @@ import pytest # teardown code has finished running. These are very rare, but are much more of an issue on # CI since they can delay builds that have passed locally. pytestmark = pytest.mark.skipif( - sys.platform == "darwin" and os.getenv("CI"), reason="Issue #411" + sys.platform == "darwin" and os.getenv("CI", "0") != "0", reason="Issue #411" )