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

Function test_anonymous_maps

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

Source from the content-addressed store, hash-verified

104
105
106def test_anonymous_maps():
107 # GIVEN
108
109 map_text = """
1107f1ac1e2b000-7f1ac1e50000 r--p 00000000 08:12 8398159
111 """
112
113 # WHEN
114
115 with patch("builtins.open", mock_open(read_data=map_text)):
116 maps = list(generate_maps_for_process(1))
117
118 # THEN
119
120 assert maps == [
121 VirtualMap(
122 start=139752898736128,
123 end=139752898887680,
124 filesize=151552,
125 offset=0,
126 device="08:12",
127 flags="r--p",
128 inode=8398159,
129 path=None,
130 ),
131 ]
132
133
134def test_map_permissions():

Callers

nothing calls this directly

Calls 2

VirtualMapClass · 0.90

Tested by

no test coverage detected