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

Function test_virtual_map

tests/unit/test_maps.py:17–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15
16
17def test_virtual_map():
18 # GIVEN
19
20 map = VirtualMap(
21 start=0,
22 end=10,
23 offset=1234,
24 device="device",
25 flags="xrwp",
26 inode=42,
27 path=None,
28 filesize=10,
29 )
30
31 # WHEN / THEN
32
33 assert map.contains(5)
34 assert not map.contains(15)
35 assert map.is_private()
36 assert map.is_executable()
37 assert map.is_readable()
38 assert map.is_writable()
39
40
41def test_simple_maps_no_such_pid():

Callers

nothing calls this directly

Calls 6

containsMethod · 0.95
is_privateMethod · 0.95
is_executableMethod · 0.95
is_readableMethod · 0.95
is_writableMethod · 0.95
VirtualMapClass · 0.90

Tested by

no test coverage detected