From 309e3d38a0f45253413a5a803b5e090b6e2f0079 Mon Sep 17 00:00:00 2001 From: "david@mcbf.net" Date: Sat, 26 Jul 2014 18:19:27 +0200 Subject: [PATCH] Directly pass multiple parameters with mark.parametrize() --HG-- branch : xfail-cause --- testing/test_skipping.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/testing/test_skipping.py b/testing/test_skipping.py index cc5c29c0e..45652703a 100644 --- a/testing/test_skipping.py +++ b/testing/test_skipping.py @@ -331,15 +331,13 @@ class TestXFail: ]) - @pytest.mark.parametrize('params', [('TypeError', 'TypeError', "*1 xfailed*"), - ('(AttributeError, TypeError)', 'TypeError', - "*1 xfailed*"), - ('TypeError', 'IndexError', "*1 failed*"), - ('(AttributeError, TypeError)', 'IndexError', - "*1 failed*"), - ]) - def test_xfail_raises(self, params, testdir): - expected, actual, matchline = params + @pytest.mark.parametrize('expected, actual, matchline', + [('TypeError', 'TypeError', "*1 xfailed*"), + ('(AttributeError, TypeError)', 'TypeError', "*1 xfailed*"), + ('TypeError', 'IndexError', "*1 failed*"), + ('(AttributeError, TypeError)', 'IndexError', "*1 failed*"), + ]) + def test_xfail_raises(self, expected, actual, matchline, testdir): p = testdir.makepyfile(""" import pytest @pytest.mark.xfail(raises=%s)