()
| 366 | |
| 367 | @pytest.mark.skipif(not IS_CPYTHON, reason="Functionality to trace other threads requires CPython.") |
| 368 | def 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.") |
nothing calls this directly
no test coverage detected