Skip to content

Test docstrings are not rendered in the report in a consistent way #774

@harmin-parra

Description

@harmin-parra

I'm submitting a ...

  • bug report
  • feature request
  • support request => Please do not submit support request here, see note at the top of this template.

What is the current behavior?

Execute this pytest code

def test_1():
    """ First description """
    pass

def test_2():
    """
    Second description
    """
    pass

In the Allure report, the descriptions are included as follows:

<div class="description__text">
    <p>First description</p>
</div>
<div class="description__text">
    <pre>
        <code>Second description</code>
    </pre>
</div>

One-line docstrings are included with the <p> tag.
Multi-line docstrings are included with the <pre><code> tags.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

Execute the pytest code provided above

What is the expected behavior?

Docstrings should be included in the report in a consistent way.

What is the motivation / use case for changing the behavior?

It is desirable to have a consistent behavior

Please tell us about your environment:

  • Allure version: 2.24.1
  • Test framework: pytest@4.1.1
  • Allure adaptor: allure-pytest@2.13.2

Other information

Screenshot from 2023-11-09 22-24-51
Screenshot from 2023-11-09 22-26-25

Metadata

Metadata

Assignees

No one assigned

    Labels

    task:improvementChange that improves some user experience but can't be considered a new featuretheme:pytest

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions