From 95a5eeaaf21a65e82f5c8626034306c8dce5fcb8 Mon Sep 17 00:00:00 2001 From: Tai Sakuma Date: Mon, 1 Jul 2024 12:53:26 -0400 Subject: [PATCH] Skip a test on GitHub Actions --- tests/utils/test_thread_task_id.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/utils/test_thread_task_id.py b/tests/utils/test_thread_task_id.py index 0bd7f5da..d6c8a78e 100644 --- a/tests/utils/test_thread_task_id.py +++ b/tests/utils/test_thread_task_id.py @@ -1,8 +1,10 @@ import asyncio from asyncio import to_thread from functools import partial +from os import getenv import pytest +from pytest import mark from nextline.types import TaskNo, ThreadNo, ThreadTaskId from nextline.utils import ExcThread @@ -154,6 +156,7 @@ def test_async_asyncio_run(obj: IdComposer): asyncio.run(async_assert_call(obj, expected)) +@mark.skipif(getenv('GITHUB_ACTIONS') == 'true', reason='Fails on GitHub Actions') async def test_async_asyncio_to_thread(obj: IdComposer): expected = ThreadTaskId(ThreadNo(1), TaskNo(1)) assert_call(obj, expected)