Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ env:
install:
- sudo apt-get update

# Xvfb
- sudo apt-get install -y xvfb
# Xvfb / window manager
- sudo apt-get install -y xvfb herbstluftwm

# Qt
- python scripts/install-qt.py
Expand All @@ -38,10 +38,16 @@ install:
# others
- pip install coveralls --use-wheel

before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start
- "herbstluftwm &"
- sleep 1

script:
- python setup.py develop
# change screen size and depth in attempt to fix waitActive test (#160)
- catchsegv xvfb-run --server-args="-screen 0 640x480x24" coverage run --source=pytestqt setup.py test
- catchsegv coverage run --source=pytestqt setup.py test
- tox -e lint

after_success:
Expand Down
2 changes: 0 additions & 2 deletions pytestqt/qt_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ def _import_module(module_name):
self.Property = QtCore.Property
self.QApplication = QtGui.QApplication
self.QWidget = QtGui.QWidget
self.QLineEdit = QtGui.QLineEdit
self.QStringListModel = QtGui.QStringListModel
self.qInstallMsgHandler = QtCore.qInstallMsgHandler

Expand Down Expand Up @@ -137,7 +136,6 @@ def make_variant(value=None):
_QtWidgets = _import_module('QtWidgets')
self.QApplication = _QtWidgets.QApplication
self.QWidget = _QtWidgets.QWidget
self.QLineEdit = _QtWidgets.QLineEdit
self.qInstallMessageHandler = QtCore.qInstallMessageHandler

self.QStringListModel = QtCore.QStringListModel
Expand Down
7 changes: 1 addition & 6 deletions tests/test_basics.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,11 @@ def test_wait_window(show, method_name, qtbot):
pass
assert str(exc_info.value) == 'Available in PyQt5 only'
else:
widget = qt_api.QLineEdit()
widget = qt_api.QWidget()
qtbot.add_widget(widget)
if show:
with method(widget, timeout=1000):
widget.move(100, 100)
widget.resize(100, 100)
widget.setFocus()
widget.show()
if 'TRAVIS' in os.environ and method_name == 'waitActive':
pytest.xfail('skipping this check on travis, see #160')
else:
with pytest.raises(qtbot.TimeoutError):
with method(widget, timeout=100):
Expand Down