How to Solve Error: ‘_TestResult’ object has no attribute ‘outputBuffer’

1、 Run the main function, no test report is generated, and an error is reported: ‘_TestResult’ object has no attribute ‘outputBuffer’

Solution:

1. In htmltestreportcn.py

CTRL + F search_Testresult method, in__init__Add to method:

self.outputBuffer = io.StringIO()
self.test_start_time = round(time.time(), 2)

 

Similar Posts: