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

Function test_simple_maps

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

Source from the content-addressed store, hash-verified

48
49
50def test_simple_maps():
51 # GIVEN
52
53 map_text = """
547f1ac1e2b000-7f1ac1e50000 r--p 00000000 08:12 8398159 /usr/lib/libc-2.31.so
55 """
56
57 # WHEN
58
59 with patch("builtins.open", mock_open(read_data=map_text)):
60 maps = list(generate_maps_for_process(1))
61
62 # THEN
63
64 assert maps == [
65 VirtualMap(
66 start=139752898736128,
67 end=139752898887680,
68 filesize=151552,
69 offset=0,
70 device="08:12",
71 flags="r--p",
72 inode=8398159,
73 path=Path("/usr/lib/libc-2.31.so"),
74 ),
75 ]
76
77
78def test_maps_with_long_device_numbers():

Callers

nothing calls this directly

Calls 2

VirtualMapClass · 0.90

Tested by

no test coverage detected