Skip to content

Commit fe92893

Browse files
committed
Test multiple qt_log_ignore regexes on config file
1 parent e35e333 commit fe92893

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pytestqt/_tests/test_logging.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,9 @@ def test_logging_fails_ignore(testdir):
186186
"""
187187
[pytest]
188188
qt_log_level_fail = CRITICAL
189-
qt_log_ignore = WM_DESTROY.*sent
189+
qt_log_ignore =
190+
WM_DESTROY.*sent
191+
WM_PAINT not handled
190192
"""
191193
)
192194
testdir.makepyfile(
@@ -202,7 +204,7 @@ def test3():
202204
qCritical('WM_DESTROY was sent')
203205
assert 0
204206
def test4():
205-
qCritical('WM_DESTROY was sent')
207+
qCritical('WM_PAINT not handled')
206208
qCritical('another critical message')
207209
"""
208210
)
@@ -225,7 +227,7 @@ def test4():
225227
# test4 fails because one message is ignored but the other isn't
226228
'*_ test4 _*',
227229
'*Failure: Qt messages with level CRITICAL or above emitted*',
228-
'*QtCriticalMsg: WM_DESTROY was sent*(IGNORED)*',
230+
'*QtCriticalMsg: WM_PAINT not handled*(IGNORED)*',
229231
'*QtCriticalMsg: another critical message*',
230232

231233
# summary

0 commit comments

Comments
 (0)