Skip to content

Percentages don't align correctly #7166

Closed
@ghost

Description

This is a really petty issue, so please excuse it. I know it isn't overly important compared to most issues here.

The percentages for execution logging do not align when there is a large number of tests being run. This leads to the lines of . overflowing to the next line, which makes the graph become difficult to read.

I have had a poke around in the code, but I do not feel comfortable trying to fix this without more time to understand what the code is doing, unfortunately.

Thanks for taking the time to look into this, greatly appreciated, we rely on Pytest heavily in our project! 👍

image

This was for the following raw output:

............................................................................................ [  3%]
............................................................................................ [  6%]
............................................................................................ [  9%]
............................................................................................ [ 13%]
............................................................................................ [ 16%]
............................................................................................ [ 19%]
............................................................................................ [ 23%]
............................................................................................ [ 26%]
............................................................................................ [ 29%]
............................................................................................ [ 33%]
............................................................................................ [ 36%]
............................................................................................ [ 39%]
............................................................................................ [ 43%]
............................................................................................. [ 46%]
............................................................................................. [ 49%]
............................................................................................ [ 53%]
............................................................................................ [ 56%]
............................................................................................ [ 59%]
............................................................................................ [ 63%]
............................................................................................. [ 66%]
............................................................................................. [ 69%]
............................................................................................ [ 73%]
............................................................................................. [ 76%]
............................................................................................ [ 79%]
............................................................................................ [ 83%]
............................................................................................ [ 86%]
............................................................................................ [ 89%]
............................................................................................ [ 93%]
............................................................................................ [ 96%]
............................................................................................ [ 99%]
....                                                                                         [100%]
Coverage.py warning: No data was collected. (no-data-collected)

...for a total of 2,769 test cases, which leads me to think this is possibly a simple rounding issue somewhere.

Typeface: Jetbrains mono, but can repro on Droid Sans Mono and Fira Code Retina as well. The raw output suggests it isn't an issue with fonts but an issue with the number of . being printed -- I haven't bothered counting every single one yet. Can reproduce this on multiple terminals, such as the ones embedded in VSCode and IntelliJ IDEA.

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: reportingrelated to terminal output and user-facing messages and errorstype: bugproblem that needs to be addressed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions