allow test items to not be associated with a test function
this is needed for plugins like `pytest-pep8` or `pytest-flakes`
This commit is contained in:
		
							parent
							
								
									05f6422392
								
							
						
					
					
						commit
						42b1033385
					
				|  | @ -139,6 +139,7 @@ def matchkeyword(colitem, keywordexpr): | ||||||
|         mapped_names.add(name) |         mapped_names.add(name) | ||||||
| 
 | 
 | ||||||
|     # Add the names attached to the current function through direct assignment |     # Add the names attached to the current function through direct assignment | ||||||
|  |     if hasattr(colitem, 'function'): | ||||||
|         for name in colitem.function.__dict__: |         for name in colitem.function.__dict__: | ||||||
|             mapped_names.add(name) |             mapped_names.add(name) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue