Skip to content

Add xdist test#52

Open
andyg0808 wants to merge 3 commits intoftobia:developfrom
andyg0808:add-xdist-test
Open

Add xdist test#52
andyg0808 wants to merge 3 commits intoftobia:developfrom
andyg0808:add-xdist-test

Conversation

@andyg0808
Copy link

Create a test to check that a version of #36 can be achieved as-is.

By telling xdist to keep tests from one file together on one thread using --dist=loadfile, we can make sure that dependent tests are executed on the same thread, as long as they're in the same file.

By using the `--dist=loadfile` option, we can force `xdist` to keep
tests together on a thread. This test demonstrates this.
@ftobia
Copy link
Owner

ftobia commented Jun 14, 2019

Hm, I'm (finally) getting around to take a look at this. I have it failing for me locally, here's the captured stderr call

tests/test_xdist_handling.py:62: AssertionError
------------------------------------------------------------------------------- Captured stderr call --------------------------------------------------------------------------------
ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...]
pytest: error: unrecognized arguments: -n3 --dist=loadfile
  inifile: None
  rootdir: /private/var/folders/wq/ltnkdtv94t5df_69nk9243f80000gn/T/pytest-of-frank/pytest-2/test_xdist_ordering0

@MRigal
Copy link

MRigal commented Sep 17, 2019

@ftobia Maybe you haven't update your local env? testenv now has an additional dependency

@ssbarnea
Copy link

ssbarnea commented Sep 1, 2020

This is a critical test to have. xdist is one of the most popular plugins that can heavily conflict with ordering and we need to assure no regression happens or to fail-fast when we detect incompatible use-cases.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants