Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>No, it makes no sense to develop a parser. You can obtain the equivalent information from classes in <strong>runner.py</strong> module.</p> <p>Consider extending both classes <strong>TextTestRunner</strong> and <strong>TextTestResult</strong> with your custom logic (python 2.7). The output you have listed is produced by <em>TextTestResult</em>. </p> <p>Alternatively you can extend only <em>TextTestResult</em> and alter the class attribute <em>TextTestRunner.resultclass</em> setting it to your new extension class name.</p> <p>The data you can extract from TextTestResult and put into some list of dictionaries is greater or equivalent to the data your parser is able to extract.</p> <p>The unittest framework allows such tricks due to its flexible design. Hope this was helpful.</p> <p>[<strong>EDIT</strong>]</p> <p>I would find publishing your results so far (e.g. as an Open Source code on github) potentially very useful for people that find your question!</p> <p>Having said that I doubt it would be easy to improve the actual parser beyond basic regexp parsing.</p> <p>If you still would like to pursuit the text parsing approach - you might need to enumerate and describe "all flavors of Python Unit test format" that you want to cover/support. If you are lucky to put such a description in form of a context-free grammar, then maybe you would be able to develop a parser for it, that would cover "those" cases as a form of a language. </p> <p>Please take my word of caution: if text parsing is not covered by simple regexp'ing and there is a chance that you are trying to parse some irregular (context-sensitive) language - most likely you would find it extremely difficult to accomplish.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload