generate_tests: always use call_extra
- its a noop addition in the methods is empty list
This commit is contained in:
		
							parent
							
								
									13d750db20
								
							
						
					
					
						commit
						4480d3e518
					
				|  | @ -391,12 +391,8 @@ class PyCollector(PyobjMixin, nodes.Collector): | ||||||
|             methods.append(module.pytest_generate_tests) |             methods.append(module.pytest_generate_tests) | ||||||
|         if hasattr(cls, "pytest_generate_tests"): |         if hasattr(cls, "pytest_generate_tests"): | ||||||
|             methods.append(cls().pytest_generate_tests) |             methods.append(cls().pytest_generate_tests) | ||||||
|         if methods: | 
 | ||||||
|             self.ihook.pytest_generate_tests.call_extra( |         self.ihook.pytest_generate_tests.call_extra(methods, dict(metafunc=metafunc)) | ||||||
|                 methods, dict(metafunc=metafunc) |  | ||||||
|             ) |  | ||||||
|         else: |  | ||||||
|             self.ihook.pytest_generate_tests(metafunc=metafunc) |  | ||||||
| 
 | 
 | ||||||
|         if not metafunc._calls: |         if not metafunc._calls: | ||||||
|             yield Function(name, parent=self, fixtureinfo=fixtureinfo) |             yield Function(name, parent=self, fixtureinfo=fixtureinfo) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue