Skip to content

Bug in parsing test results when skipped tests or warnings present #89

@stealthcopter

Description

@stealthcopter

There is a parsing issue when including skipped tests. For example if we add

@pytest.mark.skip(reason="Not implemented yet")
def test_not_yet_implemented():
  pass

Then the result is the following:

----------- coverage: platform linux, python 3.9.4-final-0 -----------

Name Stmts Miss Cover
.github/actions/docker-test/docker.py 79 15 81%
.github/actions/another-test/another.py 62 28 55%
TOTAL 141 43 70%
======================== 17 passed, 3

Where instead of having an extra line about the number of tests passed and the time take it mashes it into the table.

I suspect this is caused by this line:

} else if (lineOfText[i].indexOf('passed in') >= 0) {

As 'passed in' doesn't occur when any tests are skipped or warnings appear. The raw output from pytest looks like one of the following:

==================== 18 passed, 6 warnings in 0.53 seconds =====================
=============== 18 passed, 3 skipped, 6 warnings in 0.58 seconds ===============

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions