Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_parse_ps_header():
header = ' UID PID PPID CPU PRI NI VSZ TIME COMMAND'
parsed = dict(_parse_ps_header(header))
assert parsed == {
'UID': slice(0, 6),
'PID': slice(6, 12),
'PPID': slice(12, 18),
'CPU': slice(18, 22),
'PRI': slice(22, 26),
'NI': slice(26, 29),
'VSZ': slice(29, 38),
'TIME': slice(38, 46),
'COMMAND': slice(46, None),
}