@ -96,6 +96,13 @@ def test_top_apps_deleted_suffix_wird_entfernt(tmp_path: Path):
assert top_apps ( 5 , tmp_path ) == [ App ( " firefox " , 1000 * 1024 ) ]
assert top_apps ( 5 , tmp_path ) == [ App ( " firefox " , 1000 * 1024 ) ]
def test_top_apps_versionsnummer_als_dateiname_nutzt_comm ( tmp_path : Path ) :
# z. B. Claude-CLI: ~/.local/share/claude/versions/2.1.276
make_proc ( tmp_path , 1 , exe = " /home/u/.local/share/claude/versions/2.1.276 " , comm = " claude " , pss_kb = 300 )
make_proc ( tmp_path , 2 , exe = " /opt/claude/claude " , comm = " claude " , pss_kb = 200 )
assert top_apps ( 5 , tmp_path ) == [ App ( " claude " , 500 * 1024 ) ]
def test_top_apps_ueberspringt_kernel_threads_und_verschwundene ( tmp_path : Path ) :
def test_top_apps_ueberspringt_kernel_threads_und_verschwundene ( tmp_path : Path ) :
# Kernel-Thread: kein exe, leeres smaps_rollup, kein VmRSS
# Kernel-Thread: kein exe, leeres smaps_rollup, kein VmRSS
make_proc ( tmp_path , 2 , exe = None , comm = " kworker/0:1 " , smaps_text = " " )
make_proc ( tmp_path , 2 , exe = None , comm = " kworker/0:1 " , smaps_text = " " )