Test that we can retrieve the thread state of a single process. This test is specially useful to run under valgrind or similar tools and to quickly check that the very basic functionality works as expected.
(method, tmpdir)
| 72 | |
| 73 | @pytest.mark.parametrize("method", STACK_METHODS) |
| 74 | def test_simple_execution_native(method, tmpdir): |
| 75 | """Test that we can retrieve the thread state of a single process. |
| 76 | |
| 77 | This test is specially useful to run under valgrind or similar tools and to |
| 78 | quickly check that the very basic functionality works as expected. |
| 79 | """ |
| 80 | |
| 81 | # WHEN |
| 82 | with spawn_child_process( |
| 83 | sys.executable, TEST_SINGLE_THREAD_FILE, tmpdir |
| 84 | ) as child_process: |
| 85 | with xfail_on_expected_exceptions(method): |
| 86 | threads = list( |
| 87 | get_process_threads( |
| 88 | child_process.pid, |
| 89 | method=method, |
| 90 | native_mode=NativeReportingMode.PYTHON, |
| 91 | ) |
| 92 | ) |
| 93 | |
| 94 | # THEN |
| 95 | assert threads is not None |
| 96 | |
| 97 | |
| 98 | @pytest.mark.parametrize("method", CORE_STACK_METHODS) |
nothing calls this directly
no test coverage detected