Failing a test after teardown_method has executed in pytest

I am trying to figure out how to write a pytest plugin that can be used to fail a test after it has been run (for anyone who wants more context, this is related to astropy/pytest-openfiles#28). Let’s consider the following simple test file: class TestClass: def setup_method(self, method): print(“In setup_method”) def teardown_method(self, method): print(“In teardown_method”)…

Details