File: conftest.py

package info (click to toggle)
plover 5.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,356 kB
  • sloc: python: 21,589; sh: 682; ansic: 25; makefile: 11
file content (26 lines) | stat: -rw-r--r-- 606 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
import os

import pytest

# Ensure i18n support does not mess us up.
os.environ["LANGUAGE"] = "C"

from plover import system
from plover.config import DEFAULT_SYSTEM_NAME
from plover.registry import registry


@pytest.fixture(scope="session", autouse=True)
def setup_plover():
    registry.update()
    system.setup(DEFAULT_SYSTEM_NAME)


pytest.register_assert_rewrite("plover_build_utils.testing")


def pytest_collection_modifyitems(items):
    for item in items:
        # Mark `gui_qt` tests.
        if "gui_qt" in item.location[0].split(os.path.sep):
            item.add_marker(pytest.mark.gui_qt)