File: conftest.py

package info (click to toggle)
python-pyqtgraph 0.14.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 8,168 kB
  • sloc: python: 54,831; makefile: 128; ansic: 40; sh: 2
file content (19 lines) | stat: -rw-r--r-- 427 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import os
import sys

import pytest

from pyqtgraph.Qt import QtCore

try:
    QtCore.QLoggingCategory.setFilterRules("qt.pyside.libpyside.warning=true")
except AttributeError:
    pass  # PySide2 does not expose `QLoggingCategory` although Qt5 has it


@pytest.fixture
def tmp_module(tmp_path):
    module_path = os.fsdecode(tmp_path)
    sys.path.insert(0, module_path)
    yield module_path
    sys.path.remove(module_path)