()
| 48 | |
| 49 | |
| 50 | def test_simple_maps(): |
| 51 | # GIVEN |
| 52 | |
| 53 | map_text = """ |
| 54 | 7f1ac1e2b000-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 | |
| 78 | def test_maps_with_long_device_numbers(): |
nothing calls this directly
no test coverage detected