PyUnitReport icon indicating copy to clipboard operation
PyUnitReport copied to clipboard

Attribute Error in HTMLTestResult Object

Open shashankkhemka opened this issue 3 years ago • 1 comments

I was using this to generate reports for pyunit testing and I found a common error. It has been reported on stackoverflow on this link: https://stackoverflow.com/questions/71858651/attributeerror-htmltestresult-object-has-no-attribute-count-relevant-tb-lev.

But there has been no help. I found a old codebase (https://svn.python.org/projects/python/tags/r312/Lib/unittest.py) for this and found that the method '_count_relevant_tb_levels' is missing from this codebase. I tried adding it manually to my local installation of the package and it works now.

Please check this and verify to revise the package.

The error I am experiencing is: AttributeError: 'HtmlTestResult' object has no attribute '_count_relevant_tb_levels'. Did you mean: '_is_relevant_tb_level'?

shashankkhemka avatar May 31 '22 22:05 shashankkhemka

the problem lies in a discrepancy by a method used at the producer or report output level. Here is a link to the package in which I correct the issue, in the feature-relevant branch.

pyunireport

anthobio23 avatar Oct 18 '22 17:10 anthobio23