MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / test_find_main_thread_id

Function test_find_main_thread_id

tests_python/test_utilities.py:368–385  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

366
367@pytest.mark.skipif(not IS_CPYTHON, reason="Functionality to trace other threads requires CPython.")
368def test_find_main_thread_id():
369 # Note: run the checks below in a separate process because they rely heavily on what's available
370 # in the env (such as threads or having threading imported).
371 _check_in_separate_process("check_main_thread_id_simple", "_pydevd_test_find_main_thread_id")
372 _check_in_separate_process("check_main_thread_id_multiple_threads", "_pydevd_test_find_main_thread_id")
373 _check_in_separate_process("check_win_threads", "_pydevd_test_find_main_thread_id")
374 _check_in_separate_process("check_fix_main_thread_id_multiple_threads", "_pydevd_test_find_main_thread_id")
375
376 import subprocess
377 import pydevd
378
379 cwd, environ = _build_launch_env()
380
381 subprocess.check_call([sys.executable, "-m", "_pydevd_test_find_main_thread_id"], env=environ, cwd=cwd)
382
383 resources_dir = os.path.join(os.path.dirname(pydevd.__file__), "tests_python", "resources")
384
385 subprocess.check_call([sys.executable, os.path.join(resources_dir, "_pydevd_test_find_main_thread_id.py")], env=environ, cwd=cwd)
386
387
388@pytest.mark.skipif(not IS_WINDOWS or IS_JYTHON, reason="Windows-only test.")

Callers

nothing calls this directly

Calls 3

_build_launch_envFunction · 0.85
joinMethod · 0.45

Tested by

no test coverage detected