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

Function test_scan_process_bss_for_python_version

tests/unit/test_process.py:399–414  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

397
398
399def test_scan_process_bss_for_python_version():
400 # GIVEM
401
402 memory = (
403 b"garbagegarbagePython 3.8.3 (default, May 22 2020, 23:30:25)garbagegarbage"
404 )
405 bss = Mock()
406 # WHEN
407
408 with patch("pystack._pystack.copy_memory_from_address", return_value=memory):
409 major, minor = scan_process_bss_for_python_version(0, bss)
410
411 # THEN
412
413 assert major == 3
414 assert minor == 8
415
416
417def test_scan_process_bss_for_python_version_failure():

Callers

nothing calls this directly

Tested by

no test coverage detected