[7.4.x] Fix user_properties not saved to XML if fixture errors during teardown by nicoddemus · Pull Request #11382 · pytest-dev/pytest (original) (raw)

Move handling of user_properties to finalize().

Previously if a fixture failed during teardown, pytest_runtest_logreport would not be called with "teardown", resulting in the user properties not being saved on the JUnit XML file.

Fixes: #11367
(cherry picked from commit 917ce9a)