Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Progress outputs are not sorted when randomly is used #158

Open
goodspark opened this issue Oct 29, 2018 · 1 comment
Open

Progress outputs are not sorted when randomly is used #158

goodspark opened this issue Oct 29, 2018 · 1 comment
Labels
3rd-party Third party plugin incompatibility

Comments

@goodspark
Copy link

When reporting an issue, include a way to reproduce the bug. For example:

  • Python 3.6.5
  • pytest 3.9.3
  • pytest-sugar 0.9.1
  • pytest-xdist 1.23.2
  • pytest-randomly 1.2.3

Command used to run py.test

pytest -n auto

Test files

test_qwe.py

import @pytest
@pytest.mark.parametrize('a', range(100))
def test_qwe(a):
    pass

test_asd.py

import @pytest
@pytest.mark.parametrize('a', range(10))
def test_asd(a):
    pass

(And then make a bunch of copies of those files somehow)

Output

screenshot from 2018-10-29 00-23-03

I suppose it kind of makes sense that outputs wouldn't be sorted when you're using a plugin that would randomly sort the tests, but also, I assumed pytest-sugar would somehow 'figure it out'.

Here's what it looks like for a 'real' project of mine:

screenshot from 2018-10-29 00-21-03

Simple fix is to just not use pytest-randomly, but I do like it's whole premise.

Not a critical problem in my book, just something I wanted to let you all know about nonetheless.

@Hultner
Copy link

Hultner commented Dec 7, 2019

Does it work with you using xdist but without pytest-randomly?
I don't have pytest-randomly but I do have xdist and if I use pytest with more then one worker I get this exact behaviour so I uninstalled sugar again. It does look nice but for me the speedup of having multiple workers on a 16-threaded workstation is worth more.

@Teemu Teemu added the 3rd-party Third party plugin incompatibility label Aug 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3rd-party Third party plugin incompatibility
Projects
None yet
Development

No branches or pull requests

3 participants