@@ -83,6 +83,10 @@ testpaths = ["tests"]
8383filterwarnings = [
8484 " error" ,
8585]
86+ markers = [
87+ " stress: high-iteration stress tests for race conditions (deselect with '-m \" not stress\" ')" ,
88+ ]
89+ addopts = " -m 'not stress'"
8690
8791[tool .coverage .run ]
8892branch = true
@@ -142,6 +146,7 @@ env_list = [
142146 " py3.14" , " py3.13" , " py3.12" , " py3.11" , " py3.10" ,
143147 " py3.14t" ,
144148 " pypy3.11" ,
149+ " stress-py3.14" , " stress-py3.14t" ,
145150 " style" ,
146151 " typing" ,
147152 " docs" ,
@@ -160,6 +165,16 @@ commands = [[
160165 {replace = " posargs" , default = [], extend = true },
161166]]
162167
168+ [tool .tox .env .stress ]
169+ description = " stress tests for stream lifecycle race conditions"
170+ commands = [[
171+ " pytest" , " -v" , " --tb=short" , " -x" , " -m" , " stress" ,
172+ " --basetemp={env_tmp_dir}" ,
173+ " --override-ini=addopts=" ,
174+ " tests/test_stream_lifecycle.py" ,
175+ {replace = " posargs" , default = [], extend = true },
176+ ]]
177+
163178[tool .tox .env .style ]
164179description = " run all pre-commit hooks on all files"
165180dependency_groups = [" pre-commit" ]
0 commit comments