@@ -26,8 +26,7 @@ def print_msg(msg_type, context, message):
26
26
qt_api.QtCore.qInstallMessageHandler(print_msg)
27
27
28
28
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')
31
30
qt_api.qDebug('this is a DEBUG message')
32
31
qt_api.qWarning('this is a WARNING message')
33
32
qt_api.qCritical('this is a CRITICAL message')
@@ -45,8 +44,7 @@ def test_types():
45
44
res .stdout .fnmatch_lines (
46
45
[
47
46
"*-- 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*" ,
50
48
"*QtDebugMsg: this is a DEBUG message*" ,
51
49
"*QtWarningMsg: this is a WARNING message*" ,
52
50
"*QtCriticalMsg: this is a CRITICAL message*" ,
@@ -56,43 +54,25 @@ def test_types():
56
54
res .stdout .fnmatch_lines (
57
55
[
58
56
"*-- 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*" ,
62
58
"this is a DEBUG message*" ,
63
59
"this is a WARNING message*" ,
64
60
"this is a CRITICAL message*" ,
65
61
]
66
62
)
67
63
68
64
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
-
86
65
def test_qtlog_fixture (qtlog ):
87
66
"""
88
67
Test qtlog fixture.
89
68
"""
90
- # qInfo is not exposed by the bindings yet (#232 )
69
+ qt_api . qInfo ( "this is an INFO message" )
91
70
qt_api .qDebug ("this is a DEBUG message" )
92
71
qt_api .qWarning ("this is a WARNING message" )
93
72
qt_api .qCritical ("this is a CRITICAL message" )
94
73
records = [(m .type , m .message .strip ()) for m in qtlog .records ]
95
74
assert records == [
75
+ (qt_api .QtCore .QtMsgType .QtInfoMsg , "this is an INFO message" ),
96
76
(qt_api .QtCore .QtMsgType .QtDebugMsg , "this is a DEBUG message" ),
97
77
(qt_api .QtCore .QtMsgType .QtWarningMsg , "this is a WARNING message" ),
98
78
(qt_api .QtCore .QtMsgType .QtCriticalMsg , "this is a CRITICAL message" ),
0 commit comments