@@ -26,8 +26,7 @@ def print_msg(msg_type, context, message):
2626 qt_api.QtCore.qInstallMessageHandler(print_msg)
2727
2828 def test_types():
29- # qInfo is not exposed by the bindings yet (#225)
30- # qt_api.qInfo('this is an INFO message')
29+ qt_api.qInfo('this is an INFO message')
3130 qt_api.qDebug('this is a DEBUG message')
3231 qt_api.qWarning('this is a WARNING message')
3332 qt_api.qCritical('this is a CRITICAL message')
@@ -45,8 +44,7 @@ def test_types():
4544 res .stdout .fnmatch_lines (
4645 [
4746 "*-- Captured Qt messages --*" ,
48- # qInfo is not exposed by the bindings yet (#232)
49- # '*QtInfoMsg: this is an INFO message*',
47+ "*QtInfoMsg: this is an INFO message*" ,
5048 "*QtDebugMsg: this is a DEBUG message*" ,
5149 "*QtWarningMsg: this is a WARNING message*" ,
5250 "*QtCriticalMsg: this is a CRITICAL message*" ,
@@ -56,43 +54,25 @@ def test_types():
5654 res .stdout .fnmatch_lines (
5755 [
5856 "*-- Captured stderr call --*" ,
59- # qInfo is not exposed by the bindings yet (#232)
60- # '*QtInfoMsg: this is an INFO message*',
61- # 'this is an INFO message*',
57+ "this is an INFO message*" ,
6258 "this is a DEBUG message*" ,
6359 "this is a WARNING message*" ,
6460 "this is a CRITICAL message*" ,
6561 ]
6662 )
6763
6864
69- def test_qinfo (qtlog ):
70- """Test INFO messages when we have means to do so. Should be temporary until bindings
71- catch up and expose qInfo (or at least QMessageLogger), then we should update
72- the other logging tests properly. #232
73- """
74-
75- if qt_api .is_pyside :
76- assert (
77- qt_api .qInfo is None
78- ), "pyside6 does not expose qInfo. If it does, update this test."
79- return
80-
81- qt_api .qInfo ("this is an INFO message" )
82- records = [(m .type , m .message .strip ()) for m in qtlog .records ]
83- assert records == [(qt_api .QtCore .QtMsgType .QtInfoMsg , "this is an INFO message" )]
84-
85-
8665def test_qtlog_fixture (qtlog ):
8766 """
8867 Test qtlog fixture.
8968 """
90- # qInfo is not exposed by the bindings yet (#232 )
69+ qt_api . qInfo ( "this is an INFO message" )
9170 qt_api .qDebug ("this is a DEBUG message" )
9271 qt_api .qWarning ("this is a WARNING message" )
9372 qt_api .qCritical ("this is a CRITICAL message" )
9473 records = [(m .type , m .message .strip ()) for m in qtlog .records ]
9574 assert records == [
75+ (qt_api .QtCore .QtMsgType .QtInfoMsg , "this is an INFO message" ),
9676 (qt_api .QtCore .QtMsgType .QtDebugMsg , "this is a DEBUG message" ),
9777 (qt_api .QtCore .QtMsgType .QtWarningMsg , "this is a WARNING message" ),
9878 (qt_api .QtCore .QtMsgType .QtCriticalMsg , "this is a CRITICAL message" ),
0 commit comments