Skip to content

All tests are None in TestSuite in Python 3 #10

@citizen-stig

Description

@citizen-stig

Populated testsuite instance has a _cleanup flag set to True in python 3 and it's omitted in python 2

As result in python 3 final test suite looks like this:
<xunitparser.TestSuite tests=[None, None, None]>

Workaround is define custom testsuite class in parser:

import xunitparser


class TestSuite(xunitparser.TestSuite):
    _cleanup = False


class MyParser(xunitparser.Parser):
    TS_CLASS = TestSuite


parser = MyParser()
ts, tr = parser.parse(open('nosetests.xml'))

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