File: test_highdpi.py

package info (click to toggle)
python-qwt 0.15.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,396 kB
  • sloc: python: 12,138; makefile: 19; sh: 10
file content (36 lines) | stat: -rw-r--r-- 1,053 bytes parent folder | download | duplicates (3)
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
28
29
30
31
32
33
34
35
36
# -*- coding: utf-8 -*-
#
# Licensed under the terms of the PyQwt License
# Copyright (C) 2003-2009 Gerard Vermeulen, for the original PyQwt example
# Copyright (c) 2015 Pierre Raybaut, for the PyQt5/PySide port and further
# developments (e.g. ported to PythonQwt API)
# (see LICENSE file for more details)

SHOW = True  # Show test in GUI-based test launcher

import os

import pytest

from qwt.tests import utils
from qwt.tests.test_simple import SimplePlot


class HighDPIPlot(SimplePlot):
    NUM_POINTS = 5000000  # 5 million points needed to test high DPI support


@pytest.mark.skip(reason="This test is not relevant for the automated test suite")
def test_highdpi():
    """Test high DPI support"""

    # Performance should be the same with "1" and "2" scale factors:
    # (as of today, this is not the case, but it has to be fixed in the future:
    #  https://github.com/PlotPyStack/PythonQwt/issues/83)
    os.environ["QT_SCALE_FACTOR"] = "2"

    utils.test_widget(HighDPIPlot, (800, 480))


if __name__ == "__main__":
    test_highdpi()