Directly pass multiple parameters with mark.parametrize()
--HG-- branch : xfail-cause
This commit is contained in:
		
							parent
							
								
									91e2b23258
								
							
						
					
					
						commit
						309e3d38a0
					
				|  | @ -331,15 +331,13 @@ class TestXFail: | ||||||
|         ]) |         ]) | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|     @pytest.mark.parametrize('params', [('TypeError', 'TypeError', "*1 xfailed*"), |     @pytest.mark.parametrize('expected, actual, matchline', | ||||||
|                                         ('(AttributeError, TypeError)', 'TypeError', |                              [('TypeError', 'TypeError', "*1 xfailed*"), | ||||||
|                                          "*1 xfailed*"), |                               ('(AttributeError, TypeError)', 'TypeError', "*1 xfailed*"), | ||||||
|                               ('TypeError', 'IndexError', "*1 failed*"), |                               ('TypeError', 'IndexError', "*1 failed*"), | ||||||
|                                         ('(AttributeError, TypeError)', 'IndexError', |                               ('(AttributeError, TypeError)', 'IndexError', "*1 failed*"), | ||||||
|                                          "*1 failed*"), |  | ||||||
|                               ]) |                               ]) | ||||||
|     def test_xfail_raises(self, params, testdir): |     def test_xfail_raises(self, expected, actual, matchline, testdir): | ||||||
|         expected, actual, matchline = params |  | ||||||
|         p = testdir.makepyfile(""" |         p = testdir.makepyfile(""" | ||||||
|             import pytest |             import pytest | ||||||
|             @pytest.mark.xfail(raises=%s) |             @pytest.mark.xfail(raises=%s) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue