Open olivierdalang opened 5 months ago
When decorating a function with recorder, nothing gets recorded if an exception is thrown in the function.
No response
responses
0.24.1
class MyTestCase(TestCase): @_recorder.record(file_path="a.yaml") def test_a(self): requests.get("https://example.com", verify=False) @_recorder.record(file_path="b.yaml") def test_b(self): requests.get("https://example.com", verify=False) self.assertEqual(1, 2) # throws an exception
Requests should be recorded in both tests (files a.yaml and b.yaml should be created)
Requests are only recorded in a (file b.yaml is NOT created)
Describe the bug
When decorating a function with recorder, nothing gets recorded if an exception is thrown in the function.
Additional context
No response
Version of
responses
0.24.1
Steps to Reproduce
Expected Result
Requests should be recorded in both tests (files a.yaml and b.yaml should be created)
Actual Result
Requests are only recorded in a (file b.yaml is NOT created)