Debian Codegraph @

tests/integration_tests/conftest.py

raw
1 # Orca
2 #
3 # Copyright 2025 Valve Corporation
4 # Author: Joanmarie Diggs <[email protected]>
5 #
6 # This library is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU Lesser General Public
8 # License as published by the Free Software Foundation; either
9 # version 2.1 of the License, or (at your option) any later version.
10 #
11 # This library is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # Lesser General Public License for more details.
15 #
16 # You should have received a copy of the GNU Lesser General Public
17 # License along with this library; if not, write to the
18 # Free Software Foundation, Inc., Franklin Street, Fifth Floor,
19 # Boston MA 02110-1301 USA.
20
21 """Shared fixtures and configuration for integration tests."""
22
23 from __future__ import annotations
24
25 import os
26 import sys
27 from typing import TYPE_CHECKING
28
29 from .dbus_fixtures import ( # noqa: F401
30 _dbus_service_proxy,
31 _module_proxy_factory,
32 dbus_timeout_fixture,
33 run_with_timeout,
34 )
35 from .gsettings_fixtures import ( # noqa: F401
36 _gsettings_handle,
37 _gsettings_profile,
38 _gsettings_registry,
39 )
40
41 if TYPE_CHECKING:
42 import pytest
43
44 sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../../src"))
45
46
47 def pytest_configure(config: pytest.Config) -> None:
48 """Register custom markers."""
49
50 config.addinivalue_line("markers", "dbus: marks tests as D-Bus specific tests")
51 config.addinivalue_line("markers", "gsettings: marks tests as GSettings integration tests")