Skip to content

Commit 465cbf2

Browse files
committed
Try to fix PyQt4 build on Travis
1 parent 1ebf18f commit 465cbf2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

pytestqt/_tests/test_logging.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,11 @@ def test_qtlog_fixture(qtlog):
5757
qCritical('this is a CRITICAL message')
5858
# note that in the messages below, we have an extra space at the end
5959
# added by Qt
60-
assert qtlog.messages == [
61-
(QtDebugMsg, 'this is a DEBUG message '),
62-
(QtWarningMsg, 'this is a WARNING message '),
63-
(QtCriticalMsg, 'this is a CRITICAL message '),
60+
messages = [(int(m.msg_type), m.msg) for m in qtlog.messages]
61+
assert messages == [
62+
(int(QtDebugMsg), 'this is a DEBUG message '),
63+
(int(QtWarningMsg), 'this is a WARNING message '),
64+
(int(QtCriticalMsg), 'this is a CRITICAL message '),
6465
]
6566
# `messages` attribute is read-only
6667
with pytest.raises(AttributeError):

0 commit comments

Comments
 (0)