Toggle snippet (87 lines)
============================= test session starts ==============================
platform linux -- Python 3.8.2, pytest-5.3.5, py-1.8.1, pluggy-0.13.1
PySide2 5.14.2.3 -- Qt runtime 5.15.2 -- Qt compiled 5.15.2
rootdir: /tmp/guix-build-python-qtawesome-1.0.2.drv-0/QtAwesome-1.0.2
plugins: qt-3.3.0
collected 5 items
qtawesome/tests/test_icon_browser.py .FF [ 60%]
qtawesome/tests/test_qtawesome.py .. [100%]
=================================== FAILURES ===================================
__________________________________ test_copy ___________________________________
qtbot = <pytestqt.qtbot.QtBot object at 0x7fffef9dc1c0>
browser = <qtawesome.icon_browser.IconBrowser object at 0x7fffeffb4790>
def test_copy(qtbot, browser):
"""
Ensure the copy UX works
"""
clipboard = QtWidgets.QApplication.instance().clipboard()
clipboard.setText('')
assert clipboard.text() == ""
# Enter a search term and press enter
> qtbot.keyClicks(browser._lineEdit, 'google')
qtawesome/tests/test_icon_browser.py:45:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<PyQt5.QtWidgets.QLineEdit object at 0x7fffeffb4ca0>, 'google')
kwargs = {}
def result(*args, **kwargs):
> return qtest_method(*args, **kwargs)
E TypeError: 'PySide2.QtTest.QTest.keyClicks' called with wrong argument types:
E PySide2.QtTest.QTest.keyClicks(QLineEdit, str)
E Supported signatures:
E PySide2.QtTest.QTest.keyClicks(PySide2.QtWidgets.QWidget, str, PySide2.QtCore.Qt.KeyboardModifiers = PySide2.QtCore.Qt.KeyboardModifier.NoModifier, int = -1)
/gnu/store/ni4pqis58imdjnlj9r29ig2ki0ry29ir-python-pytest-qt-3.3.0/lib/python3.8/site-packages/pytestqt/qtbot.py:626: TypeError
_________________________________ test_filter __________________________________
qtbot = <pytestqt.qtbot.QtBot object at 0x7fffef9e1850>
browser = <qtawesome.icon_browser.IconBrowser object at 0x7fffeffb44c0>
def test_filter(qtbot, browser):
"""
Ensure the filter UX works
"""
initRowCount = browser._listView.model().rowCount()
assert initRowCount > 0
# Enter a search term
> qtbot.keyClicks(browser._lineEdit, 'google')
qtawesome/tests/test_icon_browser.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<PyQt5.QtWidgets.QLineEdit object at 0x7fffef987790>, 'google')
kwargs = {}
def result(*args, **kwargs):
> return qtest_method(*args, **kwargs)
E TypeError: 'PySide2.QtTest.QTest.keyClicks' called with wrong argument types:
E PySide2.QtTest.QTest.keyClicks(QLineEdit, str)
E Supported signatures:
E PySide2.QtTest.QTest.keyClicks(PySide2.QtWidgets.QWidget, str, PySide2.QtCore.Qt.KeyboardModifiers = PySide2.QtCore.Qt.KeyboardModifier.NoModifier, int = -1)
/gnu/store/ni4pqis58imdjnlj9r29ig2ki0ry29ir-python-pytest-qt-3.3.0/lib/python3.8/site-packages/pytestqt/qtbot.py:626: TypeError
=============================== warnings summary ===============================
qtawesome/tests/test_icon_browser.py::test_browser_init
qtawesome/tests/test_icon_browser.py::test_browser_init
qtawesome/tests/test_icon_browser.py::test_copy
qtawesome/tests/test_icon_browser.py::test_copy
qtawesome/tests/test_icon_browser.py::test_filter
qtawesome/tests/test_icon_browser.py::test_filter
/tmp/guix-build-python-qtawesome-1.0.2.drv-0/QtAwesome-1.0.2/qtawesome/icon_browser.py:170: DeprecationWarning: an integer is required (got type float). Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
self.setGridSize(QtCore.QSize(tileWidth, tileWidth))
-- Docs: https://docs.pytest.org/en/latest/warnings.html
=================== 2 failed, 3 passed, 6 warnings in 0.38s ====================
command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "pytest" failed with status 1