Use the correct stacklevel for getfuncargvalue() deprecation warning.
Fixed #2681.
This commit is contained in:
		
							parent
							
								
									021fba4e84
								
							
						
					
					
						commit
						39331856ed
					
				|  | @ -432,7 +432,8 @@ class FixtureRequest(FuncargnamesCompatAttr): | ||||||
|         from _pytest import deprecated |         from _pytest import deprecated | ||||||
|         warnings.warn( |         warnings.warn( | ||||||
|             deprecated.GETFUNCARGVALUE, |             deprecated.GETFUNCARGVALUE, | ||||||
|             DeprecationWarning) |             DeprecationWarning, | ||||||
|  |             stacklevel=2) | ||||||
|         return self.getfixturevalue(argname) |         return self.getfixturevalue(argname) | ||||||
| 
 | 
 | ||||||
|     def _get_active_fixturedef(self, argname): |     def _get_active_fixturedef(self, argname): | ||||||
|  |  | ||||||
|  | @ -0,0 +1 @@ | ||||||
|  | Calling the deprecated `request.getfuncargvalue()` now shows the source of the call. | ||||||
		Loading…
	
		Reference in New Issue