pytest-ordering icon indicating copy to clipboard operation
pytest-ordering copied to clipboard

Add xdist test

Open andyg0808 opened this issue 7 years ago • 3 comments

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.

andyg0808 avatar Jan 25 '19 07:01 andyg0808

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

ftobia avatar Jun 14 '19 00:06 ftobia

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

MRigal avatar Sep 17 '19 15:09 MRigal

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.

ssbarnea avatar Sep 01 '20 11:09 ssbarnea