From f72fcf32c07090e0726f0b1e28ea9e30b7da8dc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Annika=20M=C3=BCcke?= Date: Wed, 26 Jun 2024 11:12:01 +0200 Subject: [PATCH] new attempt to fic conftest.py after merging --- tests/conftest.py | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 48c8e0c..cf576a8 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,36 +1,8 @@ from typing import Any -import pytest - from tpcp import BaseTpcpObject from tpcp._base import _BaseTpcpObject def _get_params_without_nested_class(instance: BaseTpcpObject) -> dict[str, Any]: return {k: v for k, v in instance.get_params().items() if not isinstance(v, _BaseTpcpObject)} - - -@pytest.fixture() -def snapshot(request): - from tpcp.testing import PyTestSnapshotTest - - with PyTestSnapshotTest(request) as snapshot_test: - yield snapshot_test - - -def pytest_addoption(parser): - group = parser.getgroup("tpcp_snapshots") - group.addoption( - "--snapshot-update", - action="store_true", - default=False, - dest="snapshot_update", - help="Update the snapshots.", - ) - group.addoption( - "--snapshot-only-check", - action="store_true", - default=False, - dest="snapshot_only_check", - help="Run as normal, but fail if a snapshot file is not found. This is usefull for CI runs.", - ) \ No newline at end of file