From 994102c937ebb64700dc0dd35499c411763c0e9b Mon Sep 17 00:00:00 2001 From: Simone Robutti Date: Thu, 20 Jan 2022 11:30:11 +0100 Subject: [PATCH] added timezone_sensitive marker (#129) --- .github/workflows/main.yml | 2 +- pyproject.toml | 4 ++++ tests/commands/test_format.py | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fb14672..0011f7a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,7 +32,7 @@ jobs: - name: Install dependencies run: scripts/install_github_actions_dev_dependencies.sh - name: Run tests in dev env - run: poetry run pytest + run: poetry run pytest -m "not timezone_sensitive" run-tests-preprod: # The type of runner that the job will run on diff --git a/pyproject.toml b/pyproject.toml index df34a88..9d2b647 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,3 +40,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry.scripts] mobilizon-reshare="mobilizon_reshare.cli.cli:mobilizon_reshare" +[tool.pytest.ini_options] +markers=[ + "timezone_sensitive" + ] \ No newline at end of file diff --git a/tests/commands/test_format.py b/tests/commands/test_format.py index faf70bf..a3bd477 100644 --- a/tests/commands/test_format.py +++ b/tests/commands/test_format.py @@ -9,6 +9,7 @@ from mobilizon_reshare.publishers.platforms.platform_mapping import ( ) +@pytest.mark.timezone_sensitive @pytest.mark.parametrize("publisher_name", name_to_formatter_class.keys()) @pytest.mark.asyncio async def test_format_event(runner, event, capsys, publisher_name): @@ -24,6 +25,7 @@ async def test_format_event(runner, event, capsys, publisher_name): ) +@pytest.mark.timezone_sensitive @pytest.mark.asyncio async def test_format_event_missing(runner, capsys): event_id = uuid.uuid4()