3a0a0c2df9
Descriptors (e.g. properties) such as in the added test case are triggered during collection, executing arbitrary code which can raise. Previously, such exceptions were propagated and failed the collection. Now these exceptions are caught and the corresponding attributes are silently ignored. A better solution would be to completely skip access to all custom descriptors, such that the offending code doesn't even trigger. However I think this requires manually going through the instance and all of its MRO for each and every attribute checking if it might be a proper fixture before accessing it. So I took the easy route here. In other words, putting something like this in your test class is still a bad idea...: @property def innocent(self): os.system('rm -rf /') Fixes #2234. |
||
---|---|---|
.. | ||
approx.py | ||
collect.py | ||
fixture.py | ||
integration.py | ||
metafunc.py | ||
raises.py | ||
setup_only.py | ||
setup_plan.py | ||
show_fixtures_per_test.py |