File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -265,3 +265,29 @@ def test1():
265
265
res = testdir .inline_run ()
266
266
passed = 1 if mark_regex == 'WM_DESTROY.*sent' else 0
267
267
res .assertoutcome (passed = passed , failed = int (not passed ))
268
+
269
+
270
+ @pytest .mark .parametrize ('apply_mark' , [True , False ])
271
+ def test_logging_fails_ignore_mark_multiple (testdir , apply_mark ):
272
+ """
273
+ Make sure qt_log_ignore mark supports multiple arguments.
274
+
275
+ :type testdir: _pytest.pytester.TmpTestdir
276
+ """
277
+ if apply_mark :
278
+ mark = '@pytest.mark.qt_log_ignore("WM_DESTROY", "WM_PAINT")'
279
+ else :
280
+ mark = ''
281
+ testdir .makepyfile (
282
+ """
283
+ from pytestqt.qt_compat import qWarning, qCritical
284
+ import pytest
285
+ @pytest.mark.qt_log_level_fail('CRITICAL')
286
+ {mark}
287
+ def test1():
288
+ qCritical('WM_PAINT was sent')
289
+ """ .format (mark = mark )
290
+ )
291
+ res = testdir .inline_run ()
292
+ passed = 1 if apply_mark else 0
293
+ res .assertoutcome (passed = passed , failed = int (not passed ))
You can’t perform that action at this time.
0 commit comments