Skip to content

Commit ea066a0

Browse files
saurabh500Copilot
andcommitted
FIX: Propagate PYTHONPATH to subprocess in GIL-release test
The CI environment does not have mssql_python installed system-wide; pytest's path manipulation makes it importable in the test process but the spawned subprocess does not inherit that. Pass sys.path via PYTHONPATH so the subprocess can locate mssql_python. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 4977bd6 commit ea066a0

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tests/test_023_ssh_tunnel_gil_release.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,10 @@ def test_connect_through_python_tcp_forwarder_does_not_deadlock():
213213
env = os.environ.copy()
214214
env["DB_CONNECTION_STRING"] = base_conn_str
215215
env["PYTHONUNBUFFERED"] = "1"
216+
# Propagate sys.path so the subprocess can find mssql_python even when
217+
# the package is only available via pytest's path manipulation or an
218+
# editable install rooted in the workspace.
219+
env["PYTHONPATH"] = os.pathsep.join(sys.path)
216220

217221
proc = subprocess.Popen(
218222
[sys.executable, __file__],

0 commit comments

Comments
 (0)