pytest icon indicating copy to clipboard operation
pytest copied to clipboard

The order in which test results are presented is uncontrollable

Open yanghuizhi opened this issue 1 year ago • 3 comments

What's the problem this feature will solve?

如图所示, 添加了

  @pytest.hookspec
  def pytest_terminal_summary(terminalreporter):

方法之后,报告偶发就会跑到 ========xxx====== 线下面,没办法固定位置。能否有方法可以固定相对位置。(黄色日志)

Describe the solution you'd like

image

image

Alternative Solutions

Additional context

yanghuizhi avatar Dec 27 '23 07:12 yanghuizhi

It's not clear what you are asking for

RonnyPfannschmidt avatar Dec 27 '23 07:12 RonnyPfannschmidt

s

image

As shown in the figure, is there any way to have the log section displayed above the arrow

During the process, I found that the order of execution was out of order, and I wanted to make sure that the log (the yellow part) was always one piece and not divided by the white result line.

yanghuizhi avatar Dec 27 '23 08:12 yanghuizhi

Are you running this in PyCharm? I noticed this happening on occasion as well.

Given it works as expected on the command-line, seems like an issue on how PyCharm handles the stdout/stderr buffers.

nicoddemus avatar Dec 27 '23 16:12 nicoddemus