Closed
Description
os: win7
py:2.7 && pytest (2.8.2) && pytest-xdist (1.13.1)
import unittest
class SomeTest(unittest.TestCase):
def test_unit1(self):
pass
def test_unit2(self):
pass
def test_unit3(self):
pass
def test_unit4(self):
pass
def test_unit4(self):
pass
def test_unit5(self):
pass
@classmethod
def setUpClass(cls):
with open('c:/abc.txt', 'a') as f :
f.write('######\n')
command:
py.test testme.py -v -n 3
content of c:/abc.txt:
######
######
######
xdist can not guarantee setUpClass() only run once ?