From ef2419efa9af2ab72b4c40e6a54d45fe6c3ccbd3 Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Sat, 26 Jun 2021 18:12:54 +0200 Subject: [PATCH] Avoid running bogus tests with Fastmail The fix that disabled VTODO tests accidentally ran all other tests twice for this storage. This wasn't picked up earlier since Fastmail is not currently running on CI. --- tests/storage/servers/fastmail/__init__.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/storage/servers/fastmail/__init__.py b/tests/storage/servers/fastmail/__init__.py index 3935c40..3233fc8 100644 --- a/tests/storage/servers/fastmail/__init__.py +++ b/tests/storage/servers/fastmail/__init__.py @@ -5,11 +5,12 @@ import pytest class ServerMixin: @pytest.fixture - def get_storage_args(self, item_type, slow_create_collection, aio_connector): - if item_type == "VTODO": - # Fastmail has non-standard support for TODOs - # See https://github.com/pimutils/vdirsyncer/issues/824 - pytest.skip("Fastmail has non-standard VTODO support.") + def get_storage_args(self, slow_create_collection, aio_connector, request): + if "item_type" in request.fixturenames: + if request.getfixturevalue("item_type") == "VTODO": + # Fastmail has non-standard support for TODOs + # See https://github.com/pimutils/vdirsyncer/issues/824 + pytest.skip("Fastmail has non-standard VTODO support.") async def inner(collection="test"): args = {