0

I have multiple tests which I run in a concurrent mode (-n) with xdist plugin. Every test creates a personal helper object from a Helper class with specific settings. But finally attributes from different tests are mixed in objects. One test has attributes from another. test1 gets helper.test2_config.

Here is a simple example:

from helper import Helper

def test1():
    helper = Helper(test1_config)
    assert helper.test()

def test2():
    helper = Helper(test2_config)
    assert helper.test()
SayPy
  • 536
  • 1
  • 4
  • 13
  • Are you saying you have dependency on tests? xdist plugin only runs it concurrently, it doesn't know about dependency if that's what are you after. If you want to run in a specific order then you can't use xdist. What is the point of running concurrently when they are not independent tests?. U could look [pytest-ordering](http://pytest-ordering.readthedocs.io/en/develop/) if that serves your purpose . I hope i got your question right. – Macintosh_89 Jun 30 '17 at 10:29
  • Thanks for help. My tests are independent. It's hard to describe, the issue was very specific. – SayPy Jun 30 '17 at 22:03

1 Answers1

0

The problem was inside helper module.

SayPy
  • 536
  • 1
  • 4
  • 13