MCPcopy Create free account
hub / github.com/bloomberg/pystack / test_simple_execution_native

Function test_simple_execution_native

tests/integration/test_smoke.py:74–95  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

72
73@pytest.mark.parametrize("method", STACK_METHODS)
74def 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)

Callers

nothing calls this directly

Calls 2

spawn_child_processFunction · 0.90

Tested by

no test coverage detected