Skip to content

junitxml not filtering ^[ characters which causes jenkins reporting to fail #267

Closed
@pytestbot

Description

@pytestbot
Contributor

Originally reported by: Anonymous


We have tests that wrap a binary tool in pexpect. If there is a problem with the test and we get a pexpect traceback where the junit results contain some xml characters that cause Jenkins junit reporter to fail and consequently not report results.
The culprit is "^[" (0x1b) that doesn't seem to be filtered out by pytest.

E       0: re.compile("Test threads created successfully")
E   buffer (last 100 chars):
E   before (last 100 chars): CANCEL) on thread 19, slot 1, serial number 1850653014!^M
E   **^[**[0m^M
E   ^M
E   Waiting for threads to terminate.^M
E
E   after: <class 'pexpect.EOF'>

Activity

pytestbot

pytestbot commented on Feb 26, 2013

@pytestbot
ContributorAuthor

Original comment by Ronny Pfannschmidt (BitBucket: RonnyPfannschmidt, GitHub: RonnyPfannschmidt):


found the problem, the valid character ranges need a review, there is a invalid area in a range we have as valid in the code

pytestbot

pytestbot commented on Feb 26, 2013

@pytestbot
ContributorAuthor

Original comment by Ronny Pfannschmidt (BitBucket: RonnyPfannschmidt, GitHub: RonnyPfannschmidt):


i have to revise the problem

the character codes are actually correct, but we write them out in a incorrect encoding

pytestbot

pytestbot commented on Feb 26, 2013

@pytestbot
ContributorAuthor

Original comment by Ronny Pfannschmidt (BitBucket: RonnyPfannschmidt, GitHub: RonnyPfannschmidt):


seems we dont, i missed the encoded file, but now the behaviour pretty much does not make sense,

pytestbot

pytestbot commented on Nov 25, 2013

@pytestbot
ContributorAuthor

Original comment by holger krekel (BitBucket: hpk42, GitHub: hpk42):


Ronny, any chance you can resolve this issue until thursday?

pytestbot

pytestbot commented on Dec 10, 2013

@pytestbot
ContributorAuthor

Original comment by Anatoly Bubenkov (BitBucket: bubenkoff, GitHub: bubenkoff):


wasn't able to reproduce the issue
please have a PR reproducting in the test (test_invalid_xml_escape)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugproblem that needs to be addressed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @pytestbot

        Issue actions

          junitxml not filtering ^[ characters which causes jenkins reporting to fail · Issue #267 · pytest-dev/pytest