Closed godlygeek closed 7 months ago
My test program for making sure the line number handling is now right was:
import mmap
def a():
b()
b()
def b():
c()
def c():
e()
def e():
f()
def f():
g()
def g():
h()
def h():
i()
def i():
j()
def j():
mmap.mmap(-1, 1024 * 1024)
a()
That made it easy to test both the case where there's not enough lines above the active frame's line to fill out our context and the case where there are (and the case where the active frame's line is close to the end of the file rather than the start, too, but that doesn't need any special handling).
Attention: 4 lines
in your changes are missing coverage. Please review.
Comparison is base (
41248ed
) 92.55% compared to head (fec7d8c
) 92.82%. Report is 6 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
src/memray/reporters/tree.py | 72.72% | 3 Missing :warning: |
tests/conftest.py | 75.00% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Update tree reporter snapshots for Textual 0.49 (the TextArea no longer shows a cursor - yay!) and fix two bugs I noticed while looking at the snapshot diff: sometimes we don't show any lines, and sometimes we highlight the wrong line! Whoops.