Skip to content

Commit

Permalink
Testing
Browse files Browse the repository at this point in the history
  • Loading branch information
dalthviz committed Jan 25, 2022
1 parent 369bb5d commit f05fb0e
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions qtpy/tests/test_qtwidgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import pytest

from qtpy import PYQT5, PYQT_VERSION, QtCore, QtWidgets, QtPrintSupport
from qtpy import PYQT5, PYQT_VERSION, QtCore, QtGui, QtWidgets


@pytest.mark.skipif(sys.platform.startswith('linux') and os.environ.get('USE_CONDA', 'No') == 'No',
Expand All @@ -18,8 +18,10 @@ def test_qtextedit_functions(qtbot):
qtbot.addWidget(textedit_widget)
textedit_widget.setTabStopWidth(90)
assert textedit_widget.tabStopWidth() == 90
printer = QtPrintSupport.QPrinter()
textedit_widget.print_(printer)
print_device = QtGui.QPdfWriter('test.pdf')
textedit_widget.print_(print_device)
assert os.path.exists('test.pdf')
os.remove('test.pdf')


@pytest.mark.skipif(sys.platform.startswith('linux') and os.environ.get('USE_CONDA', 'No') == 'No',
Expand All @@ -33,8 +35,10 @@ def test_qplaintextedit_functions(qtbot):
qtbot.addWidget(plaintextedit_widget)
plaintextedit_widget.setTabStopWidth(90)
assert plaintextedit_widget.tabStopWidth() == 90
printer = QtPrintSupport.QPrinter()
plaintextedit_widget.print_(printer)
print_device = QtGui.QPdfWriter('test.pdf')
plaintextedit_widget.print_(print_device)
assert os.path.exists('test.pdf')
os.remove('test.pdf')


def test_qapplication_functions():
Expand Down

0 comments on commit f05fb0e

Please sign in to comment.