added timezone_sensitive marker (#129)

This commit is contained in:
Simone Robutti 2022-01-20 11:30:11 +01:00 committed by GitHub
parent 5804b55dd8
commit 994102c937
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 1 deletions

View File

@ -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

View File

@ -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"
]

View File

@ -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()