File tree 1 file changed +9
-1
lines changed 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 7
7
This module is run automatically by pytest, to define and enable fixtures.
8
8
"""
9
9
10
+ import os
10
11
import sys
11
12
import warnings
12
13
@@ -74,5 +75,12 @@ def reset_sys_path():
74
75
def pytest_runtest_call (item ):
75
76
"""Convert StopEverything into skipped tests."""
76
77
outcome = yield
77
- if outcome .excinfo and issubclass (outcome .excinfo [0 ], StopEverything ):
78
+ if outcome .excinfo and issubclass (outcome .excinfo [0 ], StopEverything ): # pragma: only jython
78
79
pytest .skip (f"Skipping { item .nodeid } for StopEverything: { outcome .excinfo [1 ]} " )
80
+
81
+ # For diagnosing test running:
82
+ if 0 :
83
+ with open ("/tmp/tests.txt" , "a" ) as proctxt :
84
+ worker = os .environ .get ('PYTEST_XDIST_WORKER' , 'none' )
85
+ test = os .environ .get ("PYTEST_CURRENT_TEST" , "unknown" )
86
+ print (f"{ worker } : { test } " , file = proctxt , flush = True )
You can’t perform that action at this time.
0 commit comments