File: conftest.py

package info (click to toggle)
tmuxp 1.55.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,688 kB
  • sloc: python: 8,049; makefile: 202; sh: 14
file content (27 lines) | stat: -rw-r--r-- 658 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
"""Pytest configuration for tmuxp workspace tests."""

from __future__ import annotations

import types

import pytest

from tests.fixtures.structures import WorkspaceTestData


@pytest.fixture
def config_fixture() -> WorkspaceTestData:
    """Deferred import of tmuxp.tests.fixtures.*.

    pytest setup (conftest.py) patches os.environ["HOME"], delay execution of
    os.path.expanduser until here.
    """
    from tests.fixtures import workspace as test_workspace_data

    return WorkspaceTestData(
        **{
            k: v
            for k, v in test_workspace_data.__dict__.items()
            if isinstance(v, types.ModuleType)
        },
    )