From 28d026eb9d0c93389431f8f142a5f7c4448d13f9 Mon Sep 17 00:00:00 2001 From: Sam Bull Date: Sun, 7 Apr 2024 23:10:18 +0100 Subject: [PATCH] Create marker for internal tests (#8299) To help avoid issues with downstream packagers etc. we should disable a few tests for them which are dependent on the CI environment. --- CHANGES/8299.packaging.rst | 2 ++ setup.cfg | 1 + tests/test_imports.py | 1 + 3 files changed, 4 insertions(+) create mode 100644 CHANGES/8299.packaging.rst diff --git a/CHANGES/8299.packaging.rst b/CHANGES/8299.packaging.rst new file mode 100644 index 00000000000..05abc8237e2 --- /dev/null +++ b/CHANGES/8299.packaging.rst @@ -0,0 +1,2 @@ +Added an ``internal`` pytest marker for tests which should be skipped +by packagers (use ``-m 'not internal'`` to disable them) -- by :user:`Dreamsorcerer`. diff --git a/setup.cfg b/setup.cfg index 421f91bae47..95bc462288f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -170,3 +170,4 @@ junit_family=xunit2 xfail_strict = true markers = dev_mode: mark test to run in dev mode. + internal: tests which may cause issues for packagers, but should be run in aiohttp's CI. diff --git a/tests/test_imports.py b/tests/test_imports.py index 7d0869d46c4..7f35f5b8cc2 100644 --- a/tests/test_imports.py +++ b/tests/test_imports.py @@ -33,6 +33,7 @@ def test_web___all__(pytester: pytest.Pytester) -> None: } +@pytest.mark.internal @pytest.mark.skipif( not sys.platform.startswith("linux") or platform.python_implementation() == "PyPy", reason="Timing is more reliable on Linux",